org.polypheny.prism.Entity 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 Entity message acts as a generic wrapper for different of entities metadata messages.
*Only one of the entities metadata fields can be set for a given message instance.
*Different entity metadata messages are used to represent the metadata of different entity types.
*The available entity metadata messages are, Table for relational entities, Graph for labeled property graph entities and
*Document for entities in the document model.
*
*
* Protobuf type {@code org.polypheny.prism.Entity}
*/
public final class Entity extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:org.polypheny.prism.Entity)
EntityOrBuilder {
private static final long serialVersionUID = 0L;
// Use Entity.newBuilder() to construct.
private Entity(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Entity() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Entity();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_Entity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_Entity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.polypheny.prism.Entity.class, org.polypheny.prism.Entity.Builder.class);
}
private int entityCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object entity_;
public enum EntityCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TABLE(1),
GRAPH(2),
DOCUMENT(3),
ENTITY_NOT_SET(0);
private final int value;
private EntityCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static EntityCase valueOf(int value) {
return forNumber(value);
}
public static EntityCase forNumber(int value) {
switch (value) {
case 1: return TABLE;
case 2: return GRAPH;
case 3: return DOCUMENT;
case 0: return ENTITY_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public EntityCase
getEntityCase() {
return EntityCase.forNumber(
entityCase_);
}
public static final int TABLE_FIELD_NUMBER = 1;
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
* @return Whether the table field is set.
*/
@java.lang.Override
public boolean hasTable() {
return entityCase_ == 1;
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
* @return The table.
*/
@java.lang.Override
public org.polypheny.prism.Table getTable() {
if (entityCase_ == 1) {
return (org.polypheny.prism.Table) entity_;
}
return org.polypheny.prism.Table.getDefaultInstance();
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
@java.lang.Override
public org.polypheny.prism.TableOrBuilder getTableOrBuilder() {
if (entityCase_ == 1) {
return (org.polypheny.prism.Table) entity_;
}
return org.polypheny.prism.Table.getDefaultInstance();
}
public static final int GRAPH_FIELD_NUMBER = 2;
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
* @return Whether the graph field is set.
*/
@java.lang.Override
public boolean hasGraph() {
return entityCase_ == 2;
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
* @return The graph.
*/
@java.lang.Override
public org.polypheny.prism.Graph getGraph() {
if (entityCase_ == 2) {
return (org.polypheny.prism.Graph) entity_;
}
return org.polypheny.prism.Graph.getDefaultInstance();
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
@java.lang.Override
public org.polypheny.prism.GraphOrBuilder getGraphOrBuilder() {
if (entityCase_ == 2) {
return (org.polypheny.prism.Graph) entity_;
}
return org.polypheny.prism.Graph.getDefaultInstance();
}
public static final int DOCUMENT_FIELD_NUMBER = 3;
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
* @return Whether the document field is set.
*/
@java.lang.Override
public boolean hasDocument() {
return entityCase_ == 3;
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
* @return The document.
*/
@java.lang.Override
public org.polypheny.prism.Document getDocument() {
if (entityCase_ == 3) {
return (org.polypheny.prism.Document) entity_;
}
return org.polypheny.prism.Document.getDefaultInstance();
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
@java.lang.Override
public org.polypheny.prism.DocumentOrBuilder getDocumentOrBuilder() {
if (entityCase_ == 3) {
return (org.polypheny.prism.Document) entity_;
}
return org.polypheny.prism.Document.getDefaultInstance();
}
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 (entityCase_ == 1) {
output.writeMessage(1, (org.polypheny.prism.Table) entity_);
}
if (entityCase_ == 2) {
output.writeMessage(2, (org.polypheny.prism.Graph) entity_);
}
if (entityCase_ == 3) {
output.writeMessage(3, (org.polypheny.prism.Document) entity_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (entityCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (org.polypheny.prism.Table) entity_);
}
if (entityCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (org.polypheny.prism.Graph) entity_);
}
if (entityCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (org.polypheny.prism.Document) entity_);
}
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.Entity)) {
return super.equals(obj);
}
org.polypheny.prism.Entity other = (org.polypheny.prism.Entity) obj;
if (!getEntityCase().equals(other.getEntityCase())) return false;
switch (entityCase_) {
case 1:
if (!getTable()
.equals(other.getTable())) return false;
break;
case 2:
if (!getGraph()
.equals(other.getGraph())) return false;
break;
case 3:
if (!getDocument()
.equals(other.getDocument())) return false;
break;
case 0:
default:
}
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();
switch (entityCase_) {
case 1:
hash = (37 * hash) + TABLE_FIELD_NUMBER;
hash = (53 * hash) + getTable().hashCode();
break;
case 2:
hash = (37 * hash) + GRAPH_FIELD_NUMBER;
hash = (53 * hash) + getGraph().hashCode();
break;
case 3:
hash = (37 * hash) + DOCUMENT_FIELD_NUMBER;
hash = (53 * hash) + getDocument().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.polypheny.prism.Entity parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.Entity 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.Entity parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.Entity 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.Entity parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.polypheny.prism.Entity parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.polypheny.prism.Entity parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.polypheny.prism.Entity 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.Entity parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.polypheny.prism.Entity 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.Entity parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.polypheny.prism.Entity 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.Entity 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 Entity message acts as a generic wrapper for different of entities metadata messages.
*Only one of the entities metadata fields can be set for a given message instance.
*Different entity metadata messages are used to represent the metadata of different entity types.
*The available entity metadata messages are, Table for relational entities, Graph for labeled property graph entities and
*Document for entities in the document model.
*
*
* Protobuf type {@code org.polypheny.prism.Entity}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:org.polypheny.prism.Entity)
org.polypheny.prism.EntityOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_Entity_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_Entity_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.polypheny.prism.Entity.class, org.polypheny.prism.Entity.Builder.class);
}
// Construct using org.polypheny.prism.Entity.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (tableBuilder_ != null) {
tableBuilder_.clear();
}
if (graphBuilder_ != null) {
graphBuilder_.clear();
}
if (documentBuilder_ != null) {
documentBuilder_.clear();
}
entityCase_ = 0;
entity_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.polypheny.prism.NamespaceMetaResponses.internal_static_org_polypheny_prism_Entity_descriptor;
}
@java.lang.Override
public org.polypheny.prism.Entity getDefaultInstanceForType() {
return org.polypheny.prism.Entity.getDefaultInstance();
}
@java.lang.Override
public org.polypheny.prism.Entity build() {
org.polypheny.prism.Entity result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public org.polypheny.prism.Entity buildPartial() {
org.polypheny.prism.Entity result = new org.polypheny.prism.Entity(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(org.polypheny.prism.Entity result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(org.polypheny.prism.Entity result) {
result.entityCase_ = entityCase_;
result.entity_ = this.entity_;
if (entityCase_ == 1 &&
tableBuilder_ != null) {
result.entity_ = tableBuilder_.build();
}
if (entityCase_ == 2 &&
graphBuilder_ != null) {
result.entity_ = graphBuilder_.build();
}
if (entityCase_ == 3 &&
documentBuilder_ != null) {
result.entity_ = documentBuilder_.build();
}
}
@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.Entity) {
return mergeFrom((org.polypheny.prism.Entity)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.polypheny.prism.Entity other) {
if (other == org.polypheny.prism.Entity.getDefaultInstance()) return this;
switch (other.getEntityCase()) {
case TABLE: {
mergeTable(other.getTable());
break;
}
case GRAPH: {
mergeGraph(other.getGraph());
break;
}
case DOCUMENT: {
mergeDocument(other.getDocument());
break;
}
case ENTITY_NOT_SET: {
break;
}
}
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 10: {
input.readMessage(
getTableFieldBuilder().getBuilder(),
extensionRegistry);
entityCase_ = 1;
break;
} // case 10
case 18: {
input.readMessage(
getGraphFieldBuilder().getBuilder(),
extensionRegistry);
entityCase_ = 2;
break;
} // case 18
case 26: {
input.readMessage(
getDocumentFieldBuilder().getBuilder(),
extensionRegistry);
entityCase_ = 3;
break;
} // case 26
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 entityCase_ = 0;
private java.lang.Object entity_;
public EntityCase
getEntityCase() {
return EntityCase.forNumber(
entityCase_);
}
public Builder clearEntity() {
entityCase_ = 0;
entity_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Table, org.polypheny.prism.Table.Builder, org.polypheny.prism.TableOrBuilder> tableBuilder_;
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
* @return Whether the table field is set.
*/
@java.lang.Override
public boolean hasTable() {
return entityCase_ == 1;
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
* @return The table.
*/
@java.lang.Override
public org.polypheny.prism.Table getTable() {
if (tableBuilder_ == null) {
if (entityCase_ == 1) {
return (org.polypheny.prism.Table) entity_;
}
return org.polypheny.prism.Table.getDefaultInstance();
} else {
if (entityCase_ == 1) {
return tableBuilder_.getMessage();
}
return org.polypheny.prism.Table.getDefaultInstance();
}
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
public Builder setTable(org.polypheny.prism.Table value) {
if (tableBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
entity_ = value;
onChanged();
} else {
tableBuilder_.setMessage(value);
}
entityCase_ = 1;
return this;
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
public Builder setTable(
org.polypheny.prism.Table.Builder builderForValue) {
if (tableBuilder_ == null) {
entity_ = builderForValue.build();
onChanged();
} else {
tableBuilder_.setMessage(builderForValue.build());
}
entityCase_ = 1;
return this;
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
public Builder mergeTable(org.polypheny.prism.Table value) {
if (tableBuilder_ == null) {
if (entityCase_ == 1 &&
entity_ != org.polypheny.prism.Table.getDefaultInstance()) {
entity_ = org.polypheny.prism.Table.newBuilder((org.polypheny.prism.Table) entity_)
.mergeFrom(value).buildPartial();
} else {
entity_ = value;
}
onChanged();
} else {
if (entityCase_ == 1) {
tableBuilder_.mergeFrom(value);
} else {
tableBuilder_.setMessage(value);
}
}
entityCase_ = 1;
return this;
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
public Builder clearTable() {
if (tableBuilder_ == null) {
if (entityCase_ == 1) {
entityCase_ = 0;
entity_ = null;
onChanged();
}
} else {
if (entityCase_ == 1) {
entityCase_ = 0;
entity_ = null;
}
tableBuilder_.clear();
}
return this;
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
public org.polypheny.prism.Table.Builder getTableBuilder() {
return getTableFieldBuilder().getBuilder();
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
@java.lang.Override
public org.polypheny.prism.TableOrBuilder getTableOrBuilder() {
if ((entityCase_ == 1) && (tableBuilder_ != null)) {
return tableBuilder_.getMessageOrBuilder();
} else {
if (entityCase_ == 1) {
return (org.polypheny.prism.Table) entity_;
}
return org.polypheny.prism.Table.getDefaultInstance();
}
}
/**
*
* An entity of type Table.
*
*
* .org.polypheny.prism.Table table = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Table, org.polypheny.prism.Table.Builder, org.polypheny.prism.TableOrBuilder>
getTableFieldBuilder() {
if (tableBuilder_ == null) {
if (!(entityCase_ == 1)) {
entity_ = org.polypheny.prism.Table.getDefaultInstance();
}
tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Table, org.polypheny.prism.Table.Builder, org.polypheny.prism.TableOrBuilder>(
(org.polypheny.prism.Table) entity_,
getParentForChildren(),
isClean());
entity_ = null;
}
entityCase_ = 1;
onChanged();
return tableBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Graph, org.polypheny.prism.Graph.Builder, org.polypheny.prism.GraphOrBuilder> graphBuilder_;
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
* @return Whether the graph field is set.
*/
@java.lang.Override
public boolean hasGraph() {
return entityCase_ == 2;
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
* @return The graph.
*/
@java.lang.Override
public org.polypheny.prism.Graph getGraph() {
if (graphBuilder_ == null) {
if (entityCase_ == 2) {
return (org.polypheny.prism.Graph) entity_;
}
return org.polypheny.prism.Graph.getDefaultInstance();
} else {
if (entityCase_ == 2) {
return graphBuilder_.getMessage();
}
return org.polypheny.prism.Graph.getDefaultInstance();
}
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
public Builder setGraph(org.polypheny.prism.Graph value) {
if (graphBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
entity_ = value;
onChanged();
} else {
graphBuilder_.setMessage(value);
}
entityCase_ = 2;
return this;
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
public Builder setGraph(
org.polypheny.prism.Graph.Builder builderForValue) {
if (graphBuilder_ == null) {
entity_ = builderForValue.build();
onChanged();
} else {
graphBuilder_.setMessage(builderForValue.build());
}
entityCase_ = 2;
return this;
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
public Builder mergeGraph(org.polypheny.prism.Graph value) {
if (graphBuilder_ == null) {
if (entityCase_ == 2 &&
entity_ != org.polypheny.prism.Graph.getDefaultInstance()) {
entity_ = org.polypheny.prism.Graph.newBuilder((org.polypheny.prism.Graph) entity_)
.mergeFrom(value).buildPartial();
} else {
entity_ = value;
}
onChanged();
} else {
if (entityCase_ == 2) {
graphBuilder_.mergeFrom(value);
} else {
graphBuilder_.setMessage(value);
}
}
entityCase_ = 2;
return this;
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
public Builder clearGraph() {
if (graphBuilder_ == null) {
if (entityCase_ == 2) {
entityCase_ = 0;
entity_ = null;
onChanged();
}
} else {
if (entityCase_ == 2) {
entityCase_ = 0;
entity_ = null;
}
graphBuilder_.clear();
}
return this;
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
public org.polypheny.prism.Graph.Builder getGraphBuilder() {
return getGraphFieldBuilder().getBuilder();
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
@java.lang.Override
public org.polypheny.prism.GraphOrBuilder getGraphOrBuilder() {
if ((entityCase_ == 2) && (graphBuilder_ != null)) {
return graphBuilder_.getMessageOrBuilder();
} else {
if (entityCase_ == 2) {
return (org.polypheny.prism.Graph) entity_;
}
return org.polypheny.prism.Graph.getDefaultInstance();
}
}
/**
*
* An entity of type Graph.
*
*
* .org.polypheny.prism.Graph graph = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Graph, org.polypheny.prism.Graph.Builder, org.polypheny.prism.GraphOrBuilder>
getGraphFieldBuilder() {
if (graphBuilder_ == null) {
if (!(entityCase_ == 2)) {
entity_ = org.polypheny.prism.Graph.getDefaultInstance();
}
graphBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Graph, org.polypheny.prism.Graph.Builder, org.polypheny.prism.GraphOrBuilder>(
(org.polypheny.prism.Graph) entity_,
getParentForChildren(),
isClean());
entity_ = null;
}
entityCase_ = 2;
onChanged();
return graphBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Document, org.polypheny.prism.Document.Builder, org.polypheny.prism.DocumentOrBuilder> documentBuilder_;
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
* @return Whether the document field is set.
*/
@java.lang.Override
public boolean hasDocument() {
return entityCase_ == 3;
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
* @return The document.
*/
@java.lang.Override
public org.polypheny.prism.Document getDocument() {
if (documentBuilder_ == null) {
if (entityCase_ == 3) {
return (org.polypheny.prism.Document) entity_;
}
return org.polypheny.prism.Document.getDefaultInstance();
} else {
if (entityCase_ == 3) {
return documentBuilder_.getMessage();
}
return org.polypheny.prism.Document.getDefaultInstance();
}
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
public Builder setDocument(org.polypheny.prism.Document value) {
if (documentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
entity_ = value;
onChanged();
} else {
documentBuilder_.setMessage(value);
}
entityCase_ = 3;
return this;
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
public Builder setDocument(
org.polypheny.prism.Document.Builder builderForValue) {
if (documentBuilder_ == null) {
entity_ = builderForValue.build();
onChanged();
} else {
documentBuilder_.setMessage(builderForValue.build());
}
entityCase_ = 3;
return this;
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
public Builder mergeDocument(org.polypheny.prism.Document value) {
if (documentBuilder_ == null) {
if (entityCase_ == 3 &&
entity_ != org.polypheny.prism.Document.getDefaultInstance()) {
entity_ = org.polypheny.prism.Document.newBuilder((org.polypheny.prism.Document) entity_)
.mergeFrom(value).buildPartial();
} else {
entity_ = value;
}
onChanged();
} else {
if (entityCase_ == 3) {
documentBuilder_.mergeFrom(value);
} else {
documentBuilder_.setMessage(value);
}
}
entityCase_ = 3;
return this;
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
public Builder clearDocument() {
if (documentBuilder_ == null) {
if (entityCase_ == 3) {
entityCase_ = 0;
entity_ = null;
onChanged();
}
} else {
if (entityCase_ == 3) {
entityCase_ = 0;
entity_ = null;
}
documentBuilder_.clear();
}
return this;
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
public org.polypheny.prism.Document.Builder getDocumentBuilder() {
return getDocumentFieldBuilder().getBuilder();
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
@java.lang.Override
public org.polypheny.prism.DocumentOrBuilder getDocumentOrBuilder() {
if ((entityCase_ == 3) && (documentBuilder_ != null)) {
return documentBuilder_.getMessageOrBuilder();
} else {
if (entityCase_ == 3) {
return (org.polypheny.prism.Document) entity_;
}
return org.polypheny.prism.Document.getDefaultInstance();
}
}
/**
*
* An entity of type Document.
*
*
* .org.polypheny.prism.Document document = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Document, org.polypheny.prism.Document.Builder, org.polypheny.prism.DocumentOrBuilder>
getDocumentFieldBuilder() {
if (documentBuilder_ == null) {
if (!(entityCase_ == 3)) {
entity_ = org.polypheny.prism.Document.getDefaultInstance();
}
documentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
org.polypheny.prism.Document, org.polypheny.prism.Document.Builder, org.polypheny.prism.DocumentOrBuilder>(
(org.polypheny.prism.Document) entity_,
getParentForChildren(),
isClean());
entity_ = null;
}
entityCase_ = 3;
onChanged();
return documentBuilder_;
}
@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.Entity)
}
// @@protoc_insertion_point(class_scope:org.polypheny.prism.Entity)
private static final org.polypheny.prism.Entity DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.polypheny.prism.Entity();
}
public static org.polypheny.prism.Entity getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Entity 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.Entity getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}