@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; hash = (53 * hash) + getConnectionId().hashCode(); hash = (37 * hash) + SQL_FIELD_NUMBER; hash = (53 * hash) + getSql().hashCode(); hash = (37 * hash) + MAX_ROW_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxRowCount()); hash = (37 * hash) + STATEMENT_ID_FIELD_NUMBER; hash = (53 * hash) + getStatementId(); hash = (37 * hash) + MAX_ROWS_TOTAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxRowsTotal()); hash = (37 * hash) + FIRST_FRAME_MAX_SIZE_FIELD_NUMBER; hash = (53 * hash) + getFirstFrameMaxSize(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; hash = (53 * hash) + getConnectionId().hashCode(); hash = (37 * hash) + SQL_FIELD_NUMBER; hash = (53 * hash) + getSql().hashCode(); hash = (37 * hash) + MAX_ROW_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxRowCount()); hash = (37 * hash) + STATEMENT_ID_FIELD_NUMBER; hash = (53 * hash) + getStatementId(); hash = (37 * hash) + MAX_ROWS_TOTAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getMaxRowsTotal()); hash = (37 * hash) + FIRST_FRAME_MAX_SIZE_FIELD_NUMBER; hash = (53 * hash) + getFirstFrameMaxSize(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest other = (org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest) obj; boolean result = true; result = result && getConnectionId() .equals(other.getConnectionId()); result = result && getSql() .equals(other.getSql()); result = result && (getMaxRowCount() == other.getMaxRowCount()); result = result && (getStatementId() == other.getStatementId()); result = result && (getMaxRowsTotal() == other.getMaxRowsTotal()); result = result && (getFirstFrameMaxSize() == other.getFirstFrameMaxSize()); result = result && unknownFields.equals(other.unknownFields); return result; }
public Builder mergeFrom(org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest other) { if (other == org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest.getDefaultInstance()) return this; if (!other.getConnectionId().isEmpty()) { connectionId_ = other.connectionId_; onChanged(); } if (!other.getSql().isEmpty()) { sql_ = other.sql_; onChanged(); } if (other.getMaxRowCount() != 0L) { setMaxRowCount(other.getMaxRowCount()); } if (other.getStatementId() != 0) { setStatementId(other.getStatementId()); } if (other.getMaxRowsTotal() != 0L) { setMaxRowsTotal(other.getMaxRowsTotal()); } if (other.getFirstFrameMaxSize() != 0) { setFirstFrameMaxSize(other.getFirstFrameMaxSize()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest other = (org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest) obj; boolean result = true; result = result && getConnectionId() .equals(other.getConnectionId()); result = result && getSql() .equals(other.getSql()); result = result && (getMaxRowCount() == other.getMaxRowCount()); result = result && (getStatementId() == other.getStatementId()); result = result && (getMaxRowsTotal() == other.getMaxRowsTotal()); result = result && (getFirstFrameMaxSize() == other.getFirstFrameMaxSize()); result = result && unknownFields.equals(other.unknownFields); return result; }
@Override PrepareAndExecuteRequest deserialize(Message genericMsg) { final Requests.PrepareAndExecuteRequest msg = ProtobufService.castProtobufMessage(genericMsg, Requests.PrepareAndExecuteRequest.class); String connectionId = null; if (msg.hasField(CONNECTION_ID_DESCRIPTOR)) { connectionId = msg.getConnectionId(); } String sql = null; if (msg.hasField(SQL_DESCRIPTOR)) { sql = msg.getSql(); } // Use the old attribute, unless the new is set long maxRowsTotal = msg.getMaxRowCount(); if (msg.hasField(MAX_ROWS_TOTAL_DESCRIPTOR)) { maxRowsTotal = msg.getMaxRowsTotal(); } // Use maxRowCount (cast to an integer) if firstFrameMaxSize isn't set int maxRowsInFirstFrame = (int) maxRowsTotal; if (msg.hasField(FIRST_FRAME_MAX_SIZE_DESCRIPTOR)) { maxRowsInFirstFrame = msg.getFirstFrameMaxSize(); } return new PrepareAndExecuteRequest(connectionId, msg.getStatementId(), sql, maxRowsTotal, maxRowsInFirstFrame); }
public Builder mergeFrom(org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest other) { if (other == org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest.getDefaultInstance()) return this; if (!other.getConnectionId().isEmpty()) { connectionId_ = other.connectionId_; onChanged(); } if (!other.getSql().isEmpty()) { sql_ = other.sql_; onChanged(); } if (other.getMaxRowCount() != 0L) { setMaxRowCount(other.getMaxRowCount()); } if (other.getStatementId() != 0) { setStatementId(other.getStatementId()); } if (other.getMaxRowsTotal() != 0L) { setMaxRowsTotal(other.getMaxRowsTotal()); } if (other.getFirstFrameMaxSize() != 0) { setFirstFrameMaxSize(other.getFirstFrameMaxSize()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
public Builder mergeFrom(org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest other) { if (other == org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest.getDefaultInstance()) return this; if (!other.getConnectionId().isEmpty()) { connectionId_ = other.connectionId_; onChanged(); } if (!other.getSql().isEmpty()) { sql_ = other.sql_; onChanged(); } if (other.getMaxRowCount() != 0L) { setMaxRowCount(other.getMaxRowCount()); } if (other.getStatementId() != 0) { setStatementId(other.getStatementId()); } onChanged(); return this; }
@Override PrepareAndExecuteRequest deserialize(Message genericMsg) { final Requests.PrepareAndExecuteRequest msg = ProtobufService.castProtobufMessage(genericMsg, Requests.PrepareAndExecuteRequest.class); String connectionId = null; if (msg.hasField(CONNECTION_ID_DESCRIPTOR)) { connectionId = msg.getConnectionId(); } String sql = null; if (msg.hasField(SQL_DESCRIPTOR)) { sql = msg.getSql(); } // Use the old attribute, unless the new is set long maxRowsTotal = msg.getMaxRowCount(); if (msg.hasField(MAX_ROWS_TOTAL_DESCRIPTOR)) { maxRowsTotal = msg.getMaxRowsTotal(); } // Use maxRowCount (cast to an integer) if firstFrameMaxSize isn't set int maxRowsInFirstFrame = (int) maxRowsTotal; if (msg.hasField(FIRST_FRAME_MAX_SIZE_DESCRIPTOR)) { maxRowsInFirstFrame = msg.getFirstFrameMaxSize(); } return new PrepareAndExecuteRequest(connectionId, msg.getStatementId(), sql, maxRowsTotal, maxRowsInFirstFrame); }
@Override PrepareAndExecuteRequest deserialize(Message genericMsg) { final Requests.PrepareAndExecuteRequest msg = ProtobufService.castProtobufMessage(genericMsg, Requests.PrepareAndExecuteRequest.class); final Descriptor desc = msg.getDescriptorForType(); String connectionId = null; if (ProtobufService.hasField(msg, desc, Requests.PrepareAndExecuteRequest.CONNECTION_ID_FIELD_NUMBER)) { connectionId = msg.getConnectionId(); } String sql = null; if (ProtobufService.hasField(msg, desc, Requests.PrepareAndExecuteRequest.SQL_FIELD_NUMBER)) { sql = msg.getSql(); } return new PrepareAndExecuteRequest(connectionId, msg.getStatementId(), sql, msg.getMaxRowCount()); }