org.polypheny.prism.StatementBatchResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of polypheny-jdbc-driver Show documentation
Show all versions of polypheny-jdbc-driver Show documentation
A standards-compliant JDBC driver for Polypheny-DB.
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: org/polypheny/prism/statement_responses.proto
package org.polypheny.prism;
/**
*
*
*Represents the response after executing a batch of statements.
*This includes the batch identifier and a list of scalar results for each statement in the batch,
*typically representing the number of rows affected by each operation.
*
*
* Protobuf type {@code org.polypheny.prism.StatementBatchResponse}
*/
public final class StatementBatchResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.polypheny.prism.StatementBatchResponse)
StatementBatchResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use StatementBatchResponse.newBuilder() to construct.
private StatementBatchResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StatementBatchResponse() {
scalars_ = emptyLongList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new StatementBatchResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.polypheny.prism.StatementResponses.internal_static_org_polypheny_prism_StatementBatchResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.polypheny.prism.StatementResponses.internal_static_org_polypheny_prism_StatementBatchResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.polypheny.prism.StatementBatchResponse.class, org.polypheny.prism.StatementBatchResponse.Builder.class);
}
public static final int BATCH_ID_FIELD_NUMBER = 1;
private int batchId_ = 0;
/**
*
* The unique identifier of the executed batch.
*
*
* int32 batch_id = 1;
* @return The batchId.
*/
@java.lang.Override
public int getBatchId() {
return batchId_;
}
public static final int SCALARS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.Internal.LongList scalars_;
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @return A list containing the scalars.
*/
@java.lang.Override
public java.util.List
getScalarsList() {
return scalars_;
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @return The count of scalars.
*/
public int getScalarsCount() {
return scalars_.size();
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @param index The index of the element to return.
* @return The scalars at the given index.
*/
public long getScalars(int index) {
return scalars_.getLong(index);
}
private int scalarsMemoizedSerializedSize = -1;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (batchId_ != 0) {
output.writeInt32(1, batchId_);
}
if (getScalarsList().size() > 0) {
output.writeUInt32NoTag(18);
output.writeUInt32NoTag(scalarsMemoizedSerializedSize);
}
for (int i = 0; i < scalars_.size(); i++) {
output.writeInt64NoTag(scalars_.getLong(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (batchId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, batchId_);
}
{
int dataSize = 0;
for (int i = 0; i < scalars_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeInt64SizeNoTag(scalars_.getLong(i));
}
size += dataSize;
if (!getScalarsList().isEmpty()) {
size += 1;
size += com.google.protobuf.CodedOutputStream
.computeInt32SizeNoTag(dataSize);
}
scalarsMemoizedSerializedSize = dataSize;
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.polypheny.prism.StatementBatchResponse)) {
return super.equals(obj);
}
org.polypheny.prism.StatementBatchResponse other = (org.polypheny.prism.StatementBatchResponse) obj;
if (getBatchId()
!= other.getBatchId()) return false;
if (!getScalarsList()
.equals(other.getScalarsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BATCH_ID_FIELD_NUMBER;
hash = (53 * hash) + getBatchId();
if (getScalarsCount() > 0) {
hash = (37 * hash) + SCALARS_FIELD_NUMBER;
hash = (53 * hash) + getScalarsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.polypheny.prism.StatementBatchResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.polypheny.prism.StatementBatchResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.polypheny.prism.StatementBatchResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.polypheny.prism.StatementBatchResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*Represents the response after executing a batch of statements.
*This includes the batch identifier and a list of scalar results for each statement in the batch,
*typically representing the number of rows affected by each operation.
*
*
* Protobuf type {@code org.polypheny.prism.StatementBatchResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:org.polypheny.prism.StatementBatchResponse)
org.polypheny.prism.StatementBatchResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.polypheny.prism.StatementResponses.internal_static_org_polypheny_prism_StatementBatchResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.polypheny.prism.StatementResponses.internal_static_org_polypheny_prism_StatementBatchResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.polypheny.prism.StatementBatchResponse.class, org.polypheny.prism.StatementBatchResponse.Builder.class);
}
// Construct using org.polypheny.prism.StatementBatchResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
batchId_ = 0;
scalars_ = emptyLongList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.polypheny.prism.StatementResponses.internal_static_org_polypheny_prism_StatementBatchResponse_descriptor;
}
@java.lang.Override
public org.polypheny.prism.StatementBatchResponse getDefaultInstanceForType() {
return org.polypheny.prism.StatementBatchResponse.getDefaultInstance();
}
@java.lang.Override
public org.polypheny.prism.StatementBatchResponse build() {
org.polypheny.prism.StatementBatchResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.polypheny.prism.StatementBatchResponse buildPartial() {
org.polypheny.prism.StatementBatchResponse result = new org.polypheny.prism.StatementBatchResponse(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.polypheny.prism.StatementBatchResponse result) {
if (((bitField0_ & 0x00000002) != 0)) {
scalars_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.scalars_ = scalars_;
}
private void buildPartial0(org.polypheny.prism.StatementBatchResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.batchId_ = batchId_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.polypheny.prism.StatementBatchResponse) {
return mergeFrom((org.polypheny.prism.StatementBatchResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.polypheny.prism.StatementBatchResponse other) {
if (other == org.polypheny.prism.StatementBatchResponse.getDefaultInstance()) return this;
if (other.getBatchId() != 0) {
setBatchId(other.getBatchId());
}
if (!other.scalars_.isEmpty()) {
if (scalars_.isEmpty()) {
scalars_ = other.scalars_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureScalarsIsMutable();
scalars_.addAll(other.scalars_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
batchId_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 16: {
long v = input.readInt64();
ensureScalarsIsMutable();
scalars_.addLong(v);
break;
} // case 16
case 18: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
ensureScalarsIsMutable();
while (input.getBytesUntilLimit() > 0) {
scalars_.addLong(input.readInt64());
}
input.popLimit(limit);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int batchId_ ;
/**
*
* The unique identifier of the executed batch.
*
*
* int32 batch_id = 1;
* @return The batchId.
*/
@java.lang.Override
public int getBatchId() {
return batchId_;
}
/**
*
* The unique identifier of the executed batch.
*
*
* int32 batch_id = 1;
* @param value The batchId to set.
* @return This builder for chaining.
*/
public Builder setBatchId(int value) {
batchId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The unique identifier of the executed batch.
*
*
* int32 batch_id = 1;
* @return This builder for chaining.
*/
public Builder clearBatchId() {
bitField0_ = (bitField0_ & ~0x00000001);
batchId_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Internal.LongList scalars_ = emptyLongList();
private void ensureScalarsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
scalars_ = mutableCopy(scalars_);
bitField0_ |= 0x00000002;
}
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @return A list containing the scalars.
*/
public java.util.List
getScalarsList() {
return ((bitField0_ & 0x00000002) != 0) ?
java.util.Collections.unmodifiableList(scalars_) : scalars_;
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @return The count of scalars.
*/
public int getScalarsCount() {
return scalars_.size();
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @param index The index of the element to return.
* @return The scalars at the given index.
*/
public long getScalars(int index) {
return scalars_.getLong(index);
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @param index The index to set the value at.
* @param value The scalars to set.
* @return This builder for chaining.
*/
public Builder setScalars(
int index, long value) {
ensureScalarsIsMutable();
scalars_.setLong(index, value);
onChanged();
return this;
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @param value The scalars to add.
* @return This builder for chaining.
*/
public Builder addScalars(long value) {
ensureScalarsIsMutable();
scalars_.addLong(value);
onChanged();
return this;
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @param values The scalars to add.
* @return This builder for chaining.
*/
public Builder addAllScalars(
java.lang.Iterable extends java.lang.Long> values) {
ensureScalarsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, scalars_);
onChanged();
return this;
}
/**
*
* List of scalar results for each statement in the batch.
*
*
* repeated int64 scalars = 2;
* @return This builder for chaining.
*/
public Builder clearScalars() {
scalars_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:org.polypheny.prism.StatementBatchResponse)
}
// @@protoc_insertion_point(class_scope:org.polypheny.prism.StatementBatchResponse)
private static final org.polypheny.prism.StatementBatchResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.polypheny.prism.StatementBatchResponse();
}
public static org.polypheny.prism.StatementBatchResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StatementBatchResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public org.polypheny.prism.StatementBatchResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}