org.polypheny.prism.ForeignKey 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/namespace_meta_responses.proto
package org.polypheny.prism;
/**
*
*
*The ForeignKey message details a foreign key relationship between tables, providing information about the linkage between a table's column(s) and the column(s) of another table it references.
*This relationship is crucial for maintaining referential integrity within the database.
*
*
* Protobuf type {@code org.polypheny.prism.ForeignKey}
*/
public final class ForeignKey extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.polypheny.prism.ForeignKey)
ForeignKeyOrBuilder {
private static final long serialVersionUID = 0L;
// Use ForeignKey.newBuilder() to construct.
private ForeignKey(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ForeignKey() {
referencedNamespaceName_ = "";
referencedTableName_ = "";
referencedColumns_ = java.util.Collections.emptyList();
foreignColumns_ = java.util.Collections.emptyList();
keyName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ForeignKey();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_ForeignKey_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_ForeignKey_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.polypheny.prism.ForeignKey.class, org.polypheny.prism.ForeignKey.Builder.class);
}
private int bitField0_;
public static final int REFERENCED_NAMESPACE_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object referencedNamespaceName_ = "";
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return Whether the referencedNamespaceName field is set.
*/
@java.lang.Override
public boolean hasReferencedNamespaceName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return The referencedNamespaceName.
*/
@java.lang.Override
public java.lang.String getReferencedNamespaceName() {
java.lang.Object ref = referencedNamespaceName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
referencedNamespaceName_ = s;
return s;
}
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return The bytes for referencedNamespaceName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getReferencedNamespaceNameBytes() {
java.lang.Object ref = referencedNamespaceName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
referencedNamespaceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REFERENCED_TABLE_NAME_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object referencedTableName_ = "";
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @return The referencedTableName.
*/
@java.lang.Override
public java.lang.String getReferencedTableName() {
java.lang.Object ref = referencedTableName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
referencedTableName_ = s;
return s;
}
}
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @return The bytes for referencedTableName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getReferencedTableNameBytes() {
java.lang.Object ref = referencedTableName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
referencedTableName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REFERENCED_COLUMNS_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List referencedColumns_;
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
@java.lang.Override
public java.util.List getReferencedColumnsList() {
return referencedColumns_;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
@java.lang.Override
public java.util.List
getReferencedColumnsOrBuilderList() {
return referencedColumns_;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
@java.lang.Override
public int getReferencedColumnsCount() {
return referencedColumns_.size();
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
@java.lang.Override
public org.polypheny.prism.Column getReferencedColumns(int index) {
return referencedColumns_.get(index);
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
@java.lang.Override
public org.polypheny.prism.ColumnOrBuilder getReferencedColumnsOrBuilder(
int index) {
return referencedColumns_.get(index);
}
public static final int FOREIGN_COLUMNS_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private java.util.List foreignColumns_;
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
@java.lang.Override
public java.util.List getForeignColumnsList() {
return foreignColumns_;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
@java.lang.Override
public java.util.List
getForeignColumnsOrBuilderList() {
return foreignColumns_;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
@java.lang.Override
public int getForeignColumnsCount() {
return foreignColumns_.size();
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
@java.lang.Override
public org.polypheny.prism.Column getForeignColumns(int index) {
return foreignColumns_.get(index);
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
@java.lang.Override
public org.polypheny.prism.ColumnOrBuilder getForeignColumnsOrBuilder(
int index) {
return foreignColumns_.get(index);
}
public static final int UPDATE_RULE_FIELD_NUMBER = 10;
private int updateRule_ = 0;
/**
*
*
*A numeric representation of the action taken when a referenced row is updated.
*This rule determines how changes to the referenced columns affect the rows that hold the foreign key.
*
*
* int32 update_rule = 10;
* @return The updateRule.
*/
@java.lang.Override
public int getUpdateRule() {
return updateRule_;
}
public static final int DELETE_RULE_FIELD_NUMBER = 11;
private int deleteRule_ = 0;
/**
*
*
*A numeric representation of the action taken when a referenced row is deleted.
*Similar to the update rule, this defines the behavior of the foreign key relationship when rows in the referenced table are deleted.
*
*
* int32 delete_rule = 11;
* @return The deleteRule.
*/
@java.lang.Override
public int getDeleteRule() {
return deleteRule_;
}
public static final int KEY_NAME_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object keyName_ = "";
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return Whether the keyName field is set.
*/
@java.lang.Override
public boolean hasKeyName() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return The keyName.
*/
@java.lang.Override
public java.lang.String getKeyName() {
java.lang.Object ref = keyName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyName_ = s;
return s;
}
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return The bytes for keyName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKeyNameBytes() {
java.lang.Object ref = keyName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, referencedNamespaceName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referencedTableName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, referencedTableName_);
}
for (int i = 0; i < referencedColumns_.size(); i++) {
output.writeMessage(4, referencedColumns_.get(i));
}
for (int i = 0; i < foreignColumns_.size(); i++) {
output.writeMessage(8, foreignColumns_.get(i));
}
if (updateRule_ != 0) {
output.writeInt32(10, updateRule_);
}
if (deleteRule_ != 0) {
output.writeInt32(11, deleteRule_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, keyName_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, referencedNamespaceName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(referencedTableName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, referencedTableName_);
}
for (int i = 0; i < referencedColumns_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, referencedColumns_.get(i));
}
for (int i = 0; i < foreignColumns_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, foreignColumns_.get(i));
}
if (updateRule_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(10, updateRule_);
}
if (deleteRule_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(11, deleteRule_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, keyName_);
}
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.ForeignKey)) {
return super.equals(obj);
}
org.polypheny.prism.ForeignKey other = (org.polypheny.prism.ForeignKey) obj;
if (hasReferencedNamespaceName() != other.hasReferencedNamespaceName()) return false;
if (hasReferencedNamespaceName()) {
if (!getReferencedNamespaceName()
.equals(other.getReferencedNamespaceName())) return false;
}
if (!getReferencedTableName()
.equals(other.getReferencedTableName())) return false;
if (!getReferencedColumnsList()
.equals(other.getReferencedColumnsList())) return false;
if (!getForeignColumnsList()
.equals(other.getForeignColumnsList())) return false;
if (getUpdateRule()
!= other.getUpdateRule()) return false;
if (getDeleteRule()
!= other.getDeleteRule()) return false;
if (hasKeyName() != other.hasKeyName()) return false;
if (hasKeyName()) {
if (!getKeyName()
.equals(other.getKeyName())) 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();
if (hasReferencedNamespaceName()) {
hash = (37 * hash) + REFERENCED_NAMESPACE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getReferencedNamespaceName().hashCode();
}
hash = (37 * hash) + REFERENCED_TABLE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getReferencedTableName().hashCode();
if (getReferencedColumnsCount() > 0) {
hash = (37 * hash) + REFERENCED_COLUMNS_FIELD_NUMBER;
hash = (53 * hash) + getReferencedColumnsList().hashCode();
}
if (getForeignColumnsCount() > 0) {
hash = (37 * hash) + FOREIGN_COLUMNS_FIELD_NUMBER;
hash = (53 * hash) + getForeignColumnsList().hashCode();
}
hash = (37 * hash) + UPDATE_RULE_FIELD_NUMBER;
hash = (53 * hash) + getUpdateRule();
hash = (37 * hash) + DELETE_RULE_FIELD_NUMBER;
hash = (53 * hash) + getDeleteRule();
if (hasKeyName()) {
hash = (37 * hash) + KEY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getKeyName().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.polypheny.prism.ForeignKey parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.ForeignKey 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.ForeignKey parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.ForeignKey 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.ForeignKey parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.ForeignKey parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.polypheny.prism.ForeignKey parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.polypheny.prism.ForeignKey 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.ForeignKey parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.polypheny.prism.ForeignKey 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.ForeignKey parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.polypheny.prism.ForeignKey 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.ForeignKey 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;
}
/**
*
*
*The ForeignKey message details a foreign key relationship between tables, providing information about the linkage between a table's column(s) and the column(s) of another table it references.
*This relationship is crucial for maintaining referential integrity within the database.
*
*
* Protobuf type {@code org.polypheny.prism.ForeignKey}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:org.polypheny.prism.ForeignKey)
org.polypheny.prism.ForeignKeyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_ForeignKey_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_ForeignKey_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.polypheny.prism.ForeignKey.class, org.polypheny.prism.ForeignKey.Builder.class);
}
// Construct using org.polypheny.prism.ForeignKey.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
referencedNamespaceName_ = "";
referencedTableName_ = "";
if (referencedColumnsBuilder_ == null) {
referencedColumns_ = java.util.Collections.emptyList();
} else {
referencedColumns_ = null;
referencedColumnsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (foreignColumnsBuilder_ == null) {
foreignColumns_ = java.util.Collections.emptyList();
} else {
foreignColumns_ = null;
foreignColumnsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
updateRule_ = 0;
deleteRule_ = 0;
keyName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_ForeignKey_descriptor;
}
@java.lang.Override
public org.polypheny.prism.ForeignKey getDefaultInstanceForType() {
return org.polypheny.prism.ForeignKey.getDefaultInstance();
}
@java.lang.Override
public org.polypheny.prism.ForeignKey build() {
org.polypheny.prism.ForeignKey result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.polypheny.prism.ForeignKey buildPartial() {
org.polypheny.prism.ForeignKey result = new org.polypheny.prism.ForeignKey(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(org.polypheny.prism.ForeignKey result) {
if (referencedColumnsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
referencedColumns_ = java.util.Collections.unmodifiableList(referencedColumns_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.referencedColumns_ = referencedColumns_;
} else {
result.referencedColumns_ = referencedColumnsBuilder_.build();
}
if (foreignColumnsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
foreignColumns_ = java.util.Collections.unmodifiableList(foreignColumns_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.foreignColumns_ = foreignColumns_;
} else {
result.foreignColumns_ = foreignColumnsBuilder_.build();
}
}
private void buildPartial0(org.polypheny.prism.ForeignKey result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.referencedNamespaceName_ = referencedNamespaceName_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.referencedTableName_ = referencedTableName_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.updateRule_ = updateRule_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.deleteRule_ = deleteRule_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.keyName_ = keyName_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@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.ForeignKey) {
return mergeFrom((org.polypheny.prism.ForeignKey)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.polypheny.prism.ForeignKey other) {
if (other == org.polypheny.prism.ForeignKey.getDefaultInstance()) return this;
if (other.hasReferencedNamespaceName()) {
referencedNamespaceName_ = other.referencedNamespaceName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getReferencedTableName().isEmpty()) {
referencedTableName_ = other.referencedTableName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (referencedColumnsBuilder_ == null) {
if (!other.referencedColumns_.isEmpty()) {
if (referencedColumns_.isEmpty()) {
referencedColumns_ = other.referencedColumns_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureReferencedColumnsIsMutable();
referencedColumns_.addAll(other.referencedColumns_);
}
onChanged();
}
} else {
if (!other.referencedColumns_.isEmpty()) {
if (referencedColumnsBuilder_.isEmpty()) {
referencedColumnsBuilder_.dispose();
referencedColumnsBuilder_ = null;
referencedColumns_ = other.referencedColumns_;
bitField0_ = (bitField0_ & ~0x00000004);
referencedColumnsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getReferencedColumnsFieldBuilder() : null;
} else {
referencedColumnsBuilder_.addAllMessages(other.referencedColumns_);
}
}
}
if (foreignColumnsBuilder_ == null) {
if (!other.foreignColumns_.isEmpty()) {
if (foreignColumns_.isEmpty()) {
foreignColumns_ = other.foreignColumns_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureForeignColumnsIsMutable();
foreignColumns_.addAll(other.foreignColumns_);
}
onChanged();
}
} else {
if (!other.foreignColumns_.isEmpty()) {
if (foreignColumnsBuilder_.isEmpty()) {
foreignColumnsBuilder_.dispose();
foreignColumnsBuilder_ = null;
foreignColumns_ = other.foreignColumns_;
bitField0_ = (bitField0_ & ~0x00000008);
foreignColumnsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getForeignColumnsFieldBuilder() : null;
} else {
foreignColumnsBuilder_.addAllMessages(other.foreignColumns_);
}
}
}
if (other.getUpdateRule() != 0) {
setUpdateRule(other.getUpdateRule());
}
if (other.getDeleteRule() != 0) {
setDeleteRule(other.getDeleteRule());
}
if (other.hasKeyName()) {
keyName_ = other.keyName_;
bitField0_ |= 0x00000040;
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 18: {
referencedNamespaceName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 18
case 26: {
referencedTableName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 26
case 34: {
org.polypheny.prism.Column m =
input.readMessage(
org.polypheny.prism.Column.parser(),
extensionRegistry);
if (referencedColumnsBuilder_ == null) {
ensureReferencedColumnsIsMutable();
referencedColumns_.add(m);
} else {
referencedColumnsBuilder_.addMessage(m);
}
break;
} // case 34
case 66: {
org.polypheny.prism.Column m =
input.readMessage(
org.polypheny.prism.Column.parser(),
extensionRegistry);
if (foreignColumnsBuilder_ == null) {
ensureForeignColumnsIsMutable();
foreignColumns_.add(m);
} else {
foreignColumnsBuilder_.addMessage(m);
}
break;
} // case 66
case 80: {
updateRule_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 80
case 88: {
deleteRule_ = input.readInt32();
bitField0_ |= 0x00000020;
break;
} // case 88
case 98: {
keyName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 98
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 java.lang.Object referencedNamespaceName_ = "";
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return Whether the referencedNamespaceName field is set.
*/
public boolean hasReferencedNamespaceName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return The referencedNamespaceName.
*/
public java.lang.String getReferencedNamespaceName() {
java.lang.Object ref = referencedNamespaceName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
referencedNamespaceName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return The bytes for referencedNamespaceName.
*/
public com.google.protobuf.ByteString
getReferencedNamespaceNameBytes() {
java.lang.Object ref = referencedNamespaceName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
referencedNamespaceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @param value The referencedNamespaceName to set.
* @return This builder for chaining.
*/
public Builder setReferencedNamespaceName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
referencedNamespaceName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @return This builder for chaining.
*/
public Builder clearReferencedNamespaceName() {
referencedNamespaceName_ = getDefaultInstance().getReferencedNamespaceName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*The namespace or schema of the referenced table.
*This indicates the specific namespace or schema within the database where the referenced table resides.
*
*
* optional string referenced_namespace_name = 2;
* @param value The bytes for referencedNamespaceName to set.
* @return This builder for chaining.
*/
public Builder setReferencedNamespaceNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
referencedNamespaceName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object referencedTableName_ = "";
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @return The referencedTableName.
*/
public java.lang.String getReferencedTableName() {
java.lang.Object ref = referencedTableName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
referencedTableName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @return The bytes for referencedTableName.
*/
public com.google.protobuf.ByteString
getReferencedTableNameBytes() {
java.lang.Object ref = referencedTableName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
referencedTableName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @param value The referencedTableName to set.
* @return This builder for chaining.
*/
public Builder setReferencedTableName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
referencedTableName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @return This builder for chaining.
*/
public Builder clearReferencedTableName() {
referencedTableName_ = getDefaultInstance().getReferencedTableName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*The table being referenced by the foreign key.
*This field identifies the target table that contains the referenced columns.
*
*
* string referenced_table_name = 3;
* @param value The bytes for referencedTableName to set.
* @return This builder for chaining.
*/
public Builder setReferencedTableNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
referencedTableName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List referencedColumns_ =
java.util.Collections.emptyList();
private void ensureReferencedColumnsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
referencedColumns_ = new java.util.ArrayList(referencedColumns_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.polypheny.prism.Column, org.polypheny.prism.Column.Builder, org.polypheny.prism.ColumnOrBuilder> referencedColumnsBuilder_;
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public java.util.List getReferencedColumnsList() {
if (referencedColumnsBuilder_ == null) {
return java.util.Collections.unmodifiableList(referencedColumns_);
} else {
return referencedColumnsBuilder_.getMessageList();
}
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public int getReferencedColumnsCount() {
if (referencedColumnsBuilder_ == null) {
return referencedColumns_.size();
} else {
return referencedColumnsBuilder_.getCount();
}
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public org.polypheny.prism.Column getReferencedColumns(int index) {
if (referencedColumnsBuilder_ == null) {
return referencedColumns_.get(index);
} else {
return referencedColumnsBuilder_.getMessage(index);
}
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder setReferencedColumns(
int index, org.polypheny.prism.Column value) {
if (referencedColumnsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReferencedColumnsIsMutable();
referencedColumns_.set(index, value);
onChanged();
} else {
referencedColumnsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder setReferencedColumns(
int index, org.polypheny.prism.Column.Builder builderForValue) {
if (referencedColumnsBuilder_ == null) {
ensureReferencedColumnsIsMutable();
referencedColumns_.set(index, builderForValue.build());
onChanged();
} else {
referencedColumnsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder addReferencedColumns(org.polypheny.prism.Column value) {
if (referencedColumnsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReferencedColumnsIsMutable();
referencedColumns_.add(value);
onChanged();
} else {
referencedColumnsBuilder_.addMessage(value);
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder addReferencedColumns(
int index, org.polypheny.prism.Column value) {
if (referencedColumnsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureReferencedColumnsIsMutable();
referencedColumns_.add(index, value);
onChanged();
} else {
referencedColumnsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder addReferencedColumns(
org.polypheny.prism.Column.Builder builderForValue) {
if (referencedColumnsBuilder_ == null) {
ensureReferencedColumnsIsMutable();
referencedColumns_.add(builderForValue.build());
onChanged();
} else {
referencedColumnsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder addReferencedColumns(
int index, org.polypheny.prism.Column.Builder builderForValue) {
if (referencedColumnsBuilder_ == null) {
ensureReferencedColumnsIsMutable();
referencedColumns_.add(index, builderForValue.build());
onChanged();
} else {
referencedColumnsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder addAllReferencedColumns(
java.lang.Iterable values) {
if (referencedColumnsBuilder_ == null) {
ensureReferencedColumnsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, referencedColumns_);
onChanged();
} else {
referencedColumnsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder clearReferencedColumns() {
if (referencedColumnsBuilder_ == null) {
referencedColumns_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
referencedColumnsBuilder_.clear();
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public Builder removeReferencedColumns(int index) {
if (referencedColumnsBuilder_ == null) {
ensureReferencedColumnsIsMutable();
referencedColumns_.remove(index);
onChanged();
} else {
referencedColumnsBuilder_.remove(index);
}
return this;
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public org.polypheny.prism.Column.Builder getReferencedColumnsBuilder(
int index) {
return getReferencedColumnsFieldBuilder().getBuilder(index);
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public org.polypheny.prism.ColumnOrBuilder getReferencedColumnsOrBuilder(
int index) {
if (referencedColumnsBuilder_ == null) {
return referencedColumns_.get(index); } else {
return referencedColumnsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public java.util.List
getReferencedColumnsOrBuilderList() {
if (referencedColumnsBuilder_ != null) {
return referencedColumnsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(referencedColumns_);
}
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public org.polypheny.prism.Column.Builder addReferencedColumnsBuilder() {
return getReferencedColumnsFieldBuilder().addBuilder(
org.polypheny.prism.Column.getDefaultInstance());
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public org.polypheny.prism.Column.Builder addReferencedColumnsBuilder(
int index) {
return getReferencedColumnsFieldBuilder().addBuilder(
index, org.polypheny.prism.Column.getDefaultInstance());
}
/**
*
* The columns in the referenced table. These are the columns in the referenced table that the foreign key points to.
*
*
* repeated .org.polypheny.prism.Column referenced_columns = 4;
*/
public java.util.List
getReferencedColumnsBuilderList() {
return getReferencedColumnsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.polypheny.prism.Column, org.polypheny.prism.Column.Builder, org.polypheny.prism.ColumnOrBuilder>
getReferencedColumnsFieldBuilder() {
if (referencedColumnsBuilder_ == null) {
referencedColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.polypheny.prism.Column, org.polypheny.prism.Column.Builder, org.polypheny.prism.ColumnOrBuilder>(
referencedColumns_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
referencedColumns_ = null;
}
return referencedColumnsBuilder_;
}
private java.util.List foreignColumns_ =
java.util.Collections.emptyList();
private void ensureForeignColumnsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
foreignColumns_ = new java.util.ArrayList(foreignColumns_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.polypheny.prism.Column, org.polypheny.prism.Column.Builder, org.polypheny.prism.ColumnOrBuilder> foreignColumnsBuilder_;
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public java.util.List getForeignColumnsList() {
if (foreignColumnsBuilder_ == null) {
return java.util.Collections.unmodifiableList(foreignColumns_);
} else {
return foreignColumnsBuilder_.getMessageList();
}
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public int getForeignColumnsCount() {
if (foreignColumnsBuilder_ == null) {
return foreignColumns_.size();
} else {
return foreignColumnsBuilder_.getCount();
}
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public org.polypheny.prism.Column getForeignColumns(int index) {
if (foreignColumnsBuilder_ == null) {
return foreignColumns_.get(index);
} else {
return foreignColumnsBuilder_.getMessage(index);
}
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder setForeignColumns(
int index, org.polypheny.prism.Column value) {
if (foreignColumnsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureForeignColumnsIsMutable();
foreignColumns_.set(index, value);
onChanged();
} else {
foreignColumnsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder setForeignColumns(
int index, org.polypheny.prism.Column.Builder builderForValue) {
if (foreignColumnsBuilder_ == null) {
ensureForeignColumnsIsMutable();
foreignColumns_.set(index, builderForValue.build());
onChanged();
} else {
foreignColumnsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder addForeignColumns(org.polypheny.prism.Column value) {
if (foreignColumnsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureForeignColumnsIsMutable();
foreignColumns_.add(value);
onChanged();
} else {
foreignColumnsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder addForeignColumns(
int index, org.polypheny.prism.Column value) {
if (foreignColumnsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureForeignColumnsIsMutable();
foreignColumns_.add(index, value);
onChanged();
} else {
foreignColumnsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder addForeignColumns(
org.polypheny.prism.Column.Builder builderForValue) {
if (foreignColumnsBuilder_ == null) {
ensureForeignColumnsIsMutable();
foreignColumns_.add(builderForValue.build());
onChanged();
} else {
foreignColumnsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder addForeignColumns(
int index, org.polypheny.prism.Column.Builder builderForValue) {
if (foreignColumnsBuilder_ == null) {
ensureForeignColumnsIsMutable();
foreignColumns_.add(index, builderForValue.build());
onChanged();
} else {
foreignColumnsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder addAllForeignColumns(
java.lang.Iterable values) {
if (foreignColumnsBuilder_ == null) {
ensureForeignColumnsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, foreignColumns_);
onChanged();
} else {
foreignColumnsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder clearForeignColumns() {
if (foreignColumnsBuilder_ == null) {
foreignColumns_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
foreignColumnsBuilder_.clear();
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public Builder removeForeignColumns(int index) {
if (foreignColumnsBuilder_ == null) {
ensureForeignColumnsIsMutable();
foreignColumns_.remove(index);
onChanged();
} else {
foreignColumnsBuilder_.remove(index);
}
return this;
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public org.polypheny.prism.Column.Builder getForeignColumnsBuilder(
int index) {
return getForeignColumnsFieldBuilder().getBuilder(index);
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public org.polypheny.prism.ColumnOrBuilder getForeignColumnsOrBuilder(
int index) {
if (foreignColumnsBuilder_ == null) {
return foreignColumns_.get(index); } else {
return foreignColumnsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public java.util.List
getForeignColumnsOrBuilderList() {
if (foreignColumnsBuilder_ != null) {
return foreignColumnsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(foreignColumns_);
}
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public org.polypheny.prism.Column.Builder addForeignColumnsBuilder() {
return getForeignColumnsFieldBuilder().addBuilder(
org.polypheny.prism.Column.getDefaultInstance());
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public org.polypheny.prism.Column.Builder addForeignColumnsBuilder(
int index) {
return getForeignColumnsFieldBuilder().addBuilder(
index, org.polypheny.prism.Column.getDefaultInstance());
}
/**
*
*
*The columns in the current table that make up the foreign key.
*These columns in the table contain the foreign key constraint reference the corresponding columns in the referenced table.
*
*
* repeated .org.polypheny.prism.Column foreign_columns = 8;
*/
public java.util.List
getForeignColumnsBuilderList() {
return getForeignColumnsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.polypheny.prism.Column, org.polypheny.prism.Column.Builder, org.polypheny.prism.ColumnOrBuilder>
getForeignColumnsFieldBuilder() {
if (foreignColumnsBuilder_ == null) {
foreignColumnsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.polypheny.prism.Column, org.polypheny.prism.Column.Builder, org.polypheny.prism.ColumnOrBuilder>(
foreignColumns_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
foreignColumns_ = null;
}
return foreignColumnsBuilder_;
}
private int updateRule_ ;
/**
*
*
*A numeric representation of the action taken when a referenced row is updated.
*This rule determines how changes to the referenced columns affect the rows that hold the foreign key.
*
*
* int32 update_rule = 10;
* @return The updateRule.
*/
@java.lang.Override
public int getUpdateRule() {
return updateRule_;
}
/**
*
*
*A numeric representation of the action taken when a referenced row is updated.
*This rule determines how changes to the referenced columns affect the rows that hold the foreign key.
*
*
* int32 update_rule = 10;
* @param value The updateRule to set.
* @return This builder for chaining.
*/
public Builder setUpdateRule(int value) {
updateRule_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*A numeric representation of the action taken when a referenced row is updated.
*This rule determines how changes to the referenced columns affect the rows that hold the foreign key.
*
*
* int32 update_rule = 10;
* @return This builder for chaining.
*/
public Builder clearUpdateRule() {
bitField0_ = (bitField0_ & ~0x00000010);
updateRule_ = 0;
onChanged();
return this;
}
private int deleteRule_ ;
/**
*
*
*A numeric representation of the action taken when a referenced row is deleted.
*Similar to the update rule, this defines the behavior of the foreign key relationship when rows in the referenced table are deleted.
*
*
* int32 delete_rule = 11;
* @return The deleteRule.
*/
@java.lang.Override
public int getDeleteRule() {
return deleteRule_;
}
/**
*
*
*A numeric representation of the action taken when a referenced row is deleted.
*Similar to the update rule, this defines the behavior of the foreign key relationship when rows in the referenced table are deleted.
*
*
* int32 delete_rule = 11;
* @param value The deleteRule to set.
* @return This builder for chaining.
*/
public Builder setDeleteRule(int value) {
deleteRule_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*A numeric representation of the action taken when a referenced row is deleted.
*Similar to the update rule, this defines the behavior of the foreign key relationship when rows in the referenced table are deleted.
*
*
* int32 delete_rule = 11;
* @return This builder for chaining.
*/
public Builder clearDeleteRule() {
bitField0_ = (bitField0_ & ~0x00000020);
deleteRule_ = 0;
onChanged();
return this;
}
private java.lang.Object keyName_ = "";
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return Whether the keyName field is set.
*/
public boolean hasKeyName() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return The keyName.
*/
public java.lang.String getKeyName() {
java.lang.Object ref = keyName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
keyName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return The bytes for keyName.
*/
public com.google.protobuf.ByteString
getKeyNameBytes() {
java.lang.Object ref = keyName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
keyName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @param value The keyName to set.
* @return This builder for chaining.
*/
public Builder setKeyName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
keyName_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @return This builder for chaining.
*/
public Builder clearKeyName() {
keyName_ = getDefaultInstance().getKeyName();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*An optional name for the foreign key constraint.
*This allows for the naming of the foreign key constraint for easier reference and management within the database.
*
*
* optional string key_name = 12;
* @param value The bytes for keyName to set.
* @return This builder for chaining.
*/
public Builder setKeyNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
keyName_ = value;
bitField0_ |= 0x00000040;
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.ForeignKey)
}
// @@protoc_insertion_point(class_scope:org.polypheny.prism.ForeignKey)
private static final org.polypheny.prism.ForeignKey DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.polypheny.prism.ForeignKey();
}
public static org.polypheny.prism.ForeignKey getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ForeignKey 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.ForeignKey getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}