@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.RollbackRequest)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Requests.RollbackRequest other = (org.apache.calcite.avatica.proto.Requests.RollbackRequest) obj; boolean result = true; result = result && getConnectionId() .equals(other.getConnectionId()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getConnectionIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, connectionId_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
public Builder mergeFrom(org.apache.calcite.avatica.proto.Requests.RollbackRequest other) { if (other == org.apache.calcite.avatica.proto.Requests.RollbackRequest.getDefaultInstance()) return this; if (!other.getConnectionId().isEmpty()) { connectionId_ = other.connectionId_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
e.getMessage()).setUnfinishedMessage(this)); } finally { makeExtensionsImmutable();
@Test public void testCastProtobufMessage() { final Requests.CommitRequest commitReq = Requests.CommitRequest.newBuilder().setConnectionId("cnxn1").build(); final Requests.RollbackRequest rollbackReq = Requests.RollbackRequest.newBuilder().setConnectionId("cnxn1").build(); assertEquals(commitReq, ProtobufService.castProtobufMessage(commitReq, Requests.CommitRequest.class)); assertEquals(rollbackReq, ProtobufService.castProtobufMessage(rollbackReq, Requests.RollbackRequest.class)); try { ProtobufService.castProtobufMessage(commitReq, Requests.RollbackRequest.class); fail("Should have seen IllegalArgumentException casting CommitRequest into RollbackRequest"); } catch (IllegalArgumentException e) { // Expected } try { ProtobufService.castProtobufMessage(rollbackReq, Requests.CommitRequest.class); fail("Should have seen IllegalArgumentException casting RollbackRequest into CommitRequest"); } catch (IllegalArgumentException e) { // Expected } } }
@Test public void testCastProtobufMessage() { final Requests.CommitRequest commitReq = Requests.CommitRequest.newBuilder().setConnectionId("cnxn1").build(); final Requests.RollbackRequest rollbackReq = Requests.RollbackRequest.newBuilder().setConnectionId("cnxn1").build(); assertEquals(commitReq, ProtobufService.castProtobufMessage(commitReq, Requests.CommitRequest.class)); assertEquals(rollbackReq, ProtobufService.castProtobufMessage(rollbackReq, Requests.RollbackRequest.class)); try { ProtobufService.castProtobufMessage(commitReq, Requests.RollbackRequest.class); fail("Should have seen IllegalArgumentException casting CommitRequest into RollbackRequest"); } catch (IllegalArgumentException e) { // Expected } try { ProtobufService.castProtobufMessage(rollbackReq, Requests.CommitRequest.class); fail("Should have seen IllegalArgumentException casting RollbackRequest into CommitRequest"); } catch (IllegalArgumentException e) { // Expected } } }
@Test public void testCastProtobufMessage() { final Requests.CommitRequest commitReq = Requests.CommitRequest.newBuilder().setConnectionId("cnxn1").build(); final Requests.RollbackRequest rollbackReq = Requests.RollbackRequest.newBuilder().setConnectionId("cnxn1").build(); assertEquals(commitReq, ProtobufService.castProtobufMessage(commitReq, Requests.CommitRequest.class)); assertEquals(rollbackReq, ProtobufService.castProtobufMessage(rollbackReq, Requests.RollbackRequest.class)); try { ProtobufService.castProtobufMessage(commitReq, Requests.RollbackRequest.class); fail("Should have seen IllegalArgumentException casting CommitRequest into RollbackRequest"); } catch (IllegalArgumentException e) { // Expected } try { ProtobufService.castProtobufMessage(rollbackReq, Requests.CommitRequest.class); fail("Should have seen IllegalArgumentException casting RollbackRequest into CommitRequest"); } catch (IllegalArgumentException e) { // Expected } } }
public org.apache.calcite.avatica.proto.Requests.RollbackRequest getDefaultInstanceForType() { return org.apache.calcite.avatica.proto.Requests.RollbackRequest.getDefaultInstance(); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
@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 = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
@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.RollbackRequest)) { return super.equals(obj); } org.apache.calcite.avatica.proto.Requests.RollbackRequest other = (org.apache.calcite.avatica.proto.Requests.RollbackRequest) obj; boolean result = true; result = result && getConnectionId() .equals(other.getConnectionId()); result = result && unknownFields.equals(other.unknownFields); return result; }
@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 = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.RollbackRequest prototype) {
@java.lang.Override public org.apache.calcite.avatica.proto.Requests.RollbackRequest getDefaultInstanceForType() { return org.apache.calcite.avatica.proto.Requests.RollbackRequest.getDefaultInstance(); }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() {
public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.RollbackRequest prototype) {
/** * <code>string connection_id = 1;</code> */ public Builder clearConnectionId() { connectionId_ = getDefaultInstance().getConnectionId(); onChanged(); return this; } /**