Ejemplo n.º 1
0
  public boolean equals(TFetchResultsReq that) {
    if (that == null) return false;

    boolean this_present_operationHandle = true && this.isSetOperationHandle();
    boolean that_present_operationHandle = true && that.isSetOperationHandle();
    if (this_present_operationHandle || that_present_operationHandle) {
      if (!(this_present_operationHandle && that_present_operationHandle)) return false;
      if (!this.operationHandle.equals(that.operationHandle)) return false;
    }

    boolean this_present_orientation = true && this.isSetOrientation();
    boolean that_present_orientation = true && that.isSetOrientation();
    if (this_present_orientation || that_present_orientation) {
      if (!(this_present_orientation && that_present_orientation)) return false;
      if (!this.orientation.equals(that.orientation)) return false;
    }

    boolean this_present_maxRows = true;
    boolean that_present_maxRows = true;
    if (this_present_maxRows || that_present_maxRows) {
      if (!(this_present_maxRows && that_present_maxRows)) return false;
      if (this.maxRows != that.maxRows) return false;
    }

    return true;
  }
Ejemplo n.º 2
0
 /** Performs a deep copy on <i>other</i>. */
 public TFetchResultsReq(TFetchResultsReq other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetOperationHandle()) {
     this.operationHandle = new TOperationHandle(other.operationHandle);
   }
   if (other.isSetOrientation()) {
     this.orientation = other.orientation;
   }
   this.maxRows = other.maxRows;
 }
Ejemplo n.º 3
0
  @Override
  public int compareTo(TFetchResultsReq other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison =
        Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOperationHandle()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetOrientation()).compareTo(other.isSetOrientation());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetOrientation()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orientation, other.orientation);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetMaxRows()).compareTo(other.isSetMaxRows());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetMaxRows()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRows, other.maxRows);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
Ejemplo n.º 4
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchResultsReq struct)
        throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // OPERATION_HANDLE
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.operationHandle = new TOperationHandle();
              struct.operationHandle.read(iprot);
              struct.setOperationHandleIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // ORIENTATION
            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
              struct.orientation = TFetchOrientation.findByValue(iprot.readI32());
              struct.setOrientationIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // MAX_ROWS
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.maxRows = iprot.readI64();
              struct.setMaxRowsIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      if (!struct.isSetMaxRows()) {
        throw new org.apache.thrift.protocol.TProtocolException(
            "Required field 'maxRows' was not found in serialized data! Struct: " + toString());
      }
      struct.validate();
    }
Ejemplo n.º 5
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, TFetchResultsReq struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.operationHandle = new TOperationHandle();
   struct.operationHandle.read(iprot);
   struct.setOperationHandleIsSet(true);
   struct.orientation = TFetchOrientation.findByValue(iprot.readI32());
   struct.setOrientationIsSet(true);
   struct.maxRows = iprot.readI64();
   struct.setMaxRowsIsSet(true);
 }
Ejemplo n.º 6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, TFetchResultsReq struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.operationHandle != null) {
        oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC);
        struct.operationHandle.write(oprot);
        oprot.writeFieldEnd();
      }
      if (struct.orientation != null) {
        oprot.writeFieldBegin(ORIENTATION_FIELD_DESC);
        oprot.writeI32(struct.orientation.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(MAX_ROWS_FIELD_DESC);
      oprot.writeI64(struct.maxRows);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }