Class GqlQuery.Builder (2.10.1)

public static final class GqlQuery.Builder extends GeneratedMessageV3.Builder<GqlQuery.Builder> implements GqlQueryOrBuilder

A GQL query.

Protobuf type google.datastore.v1.GqlQuery

Implements

GqlQueryOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllPositionalBindings(Iterable<? extends GqlQueryParameter> values)

public GqlQuery.Builder addAllPositionalBindings(Iterable<? extends GqlQueryParameter> values)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.datastore.v1.GqlQueryParameter>
Returns
TypeDescription
GqlQuery.Builder

addPositionalBindings(GqlQueryParameter value)

public GqlQuery.Builder addPositionalBindings(GqlQueryParameter value)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
valueGqlQueryParameter
Returns
TypeDescription
GqlQuery.Builder

addPositionalBindings(GqlQueryParameter.Builder builderForValue)

public GqlQuery.Builder addPositionalBindings(GqlQueryParameter.Builder builderForValue)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
builderForValueGqlQueryParameter.Builder
Returns
TypeDescription
GqlQuery.Builder

addPositionalBindings(int index, GqlQueryParameter value)

public GqlQuery.Builder addPositionalBindings(int index, GqlQueryParameter value)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
NameDescription
indexint
valueGqlQueryParameter
Returns
TypeDescription
GqlQuery.Builder

addPositionalBindings(int index, GqlQueryParameter.Builder builderForValue)

public GqlQuery.Builder addPositionalBindings(int index, GqlQueryParameter.Builder builderForValue)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
NameDescription
indexint
builderForValueGqlQueryParameter.Builder
Returns
TypeDescription
GqlQuery.Builder

addPositionalBindingsBuilder()

public GqlQueryParameter.Builder addPositionalBindingsBuilder()

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
TypeDescription
GqlQueryParameter.Builder

addPositionalBindingsBuilder(int index)

public GqlQueryParameter.Builder addPositionalBindingsBuilder(int index)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
GqlQueryParameter.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public GqlQuery.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
GqlQuery.Builder
Overrides

build()

public GqlQuery build()
Returns
TypeDescription
GqlQuery

buildPartial()

public GqlQuery buildPartial()
Returns
TypeDescription
GqlQuery

clear()

public GqlQuery.Builder clear()
Returns
TypeDescription
GqlQuery.Builder
Overrides

clearAllowLiterals()

public GqlQuery.Builder clearAllowLiterals()

When false, the query string must not contain any literals and instead must bind all values. For example, SELECT * FROM Kind WHERE a = 'string literal' is not allowed, while SELECT * FROM Kind WHERE a = @value is.

bool allow_literals = 2;

Returns
TypeDescription
GqlQuery.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public GqlQuery.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
GqlQuery.Builder
Overrides

clearNamedBindings()

public GqlQuery.Builder clearNamedBindings()
Returns
TypeDescription
GqlQuery.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public GqlQuery.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
GqlQuery.Builder
Overrides

clearPositionalBindings()

public GqlQuery.Builder clearPositionalBindings()

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
TypeDescription
GqlQuery.Builder

clearQueryString()

public GqlQuery.Builder clearQueryString()

A string of the format described here.

string query_string = 1;

Returns
TypeDescription
GqlQuery.Builder

This builder for chaining.

clone()

public GqlQuery.Builder clone()
Returns
TypeDescription
GqlQuery.Builder
Overrides

containsNamedBindings(String key)

public boolean containsNamedBindings(String key)

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAllowLiterals()

public boolean getAllowLiterals()

When false, the query string must not contain any literals and instead must bind all values. For example, SELECT * FROM Kind WHERE a = 'string literal' is not allowed, while SELECT * FROM Kind WHERE a = @value is.

bool allow_literals = 2;

Returns
TypeDescription
boolean

The allowLiterals.

getDefaultInstanceForType()

public GqlQuery getDefaultInstanceForType()
Returns
TypeDescription
GqlQuery

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutableNamedBindings()

public Map<String,GqlQueryParameter> getMutableNamedBindings()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,GqlQueryParameter>

getNamedBindings()

public Map<String,GqlQueryParameter> getNamedBindings()
Returns
TypeDescription
Map<String,GqlQueryParameter>

getNamedBindingsCount()

public int getNamedBindingsCount()

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Returns
TypeDescription
int

getNamedBindingsMap()

public Map<String,GqlQueryParameter> getNamedBindingsMap()

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Returns
TypeDescription
Map<String,GqlQueryParameter>

getNamedBindingsOrDefault(String key, GqlQueryParameter defaultValue)

public GqlQueryParameter getNamedBindingsOrDefault(String key, GqlQueryParameter defaultValue)

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameters
NameDescription
keyString
defaultValueGqlQueryParameter
Returns
TypeDescription
GqlQueryParameter

getNamedBindingsOrThrow(String key)

public GqlQueryParameter getNamedBindingsOrThrow(String key)

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
GqlQueryParameter

getPositionalBindings(int index)

public GqlQueryParameter getPositionalBindings(int index)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
GqlQueryParameter

getPositionalBindingsBuilder(int index)

public GqlQueryParameter.Builder getPositionalBindingsBuilder(int index)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
GqlQueryParameter.Builder

getPositionalBindingsBuilderList()

public List<GqlQueryParameter.Builder> getPositionalBindingsBuilderList()

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
TypeDescription
List<Builder>

getPositionalBindingsCount()

public int getPositionalBindingsCount()

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
TypeDescription
int

getPositionalBindingsList()

public List<GqlQueryParameter> getPositionalBindingsList()

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
TypeDescription
List<GqlQueryParameter>

getPositionalBindingsOrBuilder(int index)

public GqlQueryParameterOrBuilder getPositionalBindingsOrBuilder(int index)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
GqlQueryParameterOrBuilder

getPositionalBindingsOrBuilderList()

public List<? extends GqlQueryParameterOrBuilder> getPositionalBindingsOrBuilderList()

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Returns
TypeDescription
List<? extends com.google.datastore.v1.GqlQueryParameterOrBuilder>

getQueryString()

public String getQueryString()

A string of the format described here.

string query_string = 1;

Returns
TypeDescription
String

The queryString.

getQueryStringBytes()

public ByteString getQueryStringBytes()

A string of the format described here.

string query_string = 1;

Returns
TypeDescription
ByteString

The bytes for queryString.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(GqlQuery other)

public GqlQuery.Builder mergeFrom(GqlQuery other)
Parameter
NameDescription
otherGqlQuery
Returns
TypeDescription
GqlQuery.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public GqlQuery.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
GqlQuery.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public GqlQuery.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
GqlQuery.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final GqlQuery.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
GqlQuery.Builder
Overrides

putAllNamedBindings(Map<String,GqlQueryParameter> values)

public GqlQuery.Builder putAllNamedBindings(Map<String,GqlQueryParameter> values)

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
NameDescription
valuesMap<String,GqlQueryParameter>
Returns
TypeDescription
GqlQuery.Builder

putNamedBindings(String key, GqlQueryParameter value)

public GqlQuery.Builder putNamedBindings(String key, GqlQueryParameter value)

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameters
NameDescription
keyString
valueGqlQueryParameter
Returns
TypeDescription
GqlQuery.Builder

removeNamedBindings(String key)

public GqlQuery.Builder removeNamedBindings(String key)

For each non-reserved named binding site in the query string, there must be a named parameter with that name, but not necessarily the inverse. Key must match regex A-Za-z_$, must not match regex __.__, and must not be "".

map<string, .google.datastore.v1.GqlQueryParameter> named_bindings = 5;

Parameter
NameDescription
keyString
Returns
TypeDescription
GqlQuery.Builder

removePositionalBindings(int index)

public GqlQuery.Builder removePositionalBindings(int index)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
GqlQuery.Builder

setAllowLiterals(boolean value)

public GqlQuery.Builder setAllowLiterals(boolean value)

When false, the query string must not contain any literals and instead must bind all values. For example, SELECT * FROM Kind WHERE a = 'string literal' is not allowed, while SELECT * FROM Kind WHERE a = @value is.

bool allow_literals = 2;

Parameter
NameDescription
valueboolean

The allowLiterals to set.

Returns
TypeDescription
GqlQuery.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public GqlQuery.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
GqlQuery.Builder
Overrides

setPositionalBindings(int index, GqlQueryParameter value)

public GqlQuery.Builder setPositionalBindings(int index, GqlQueryParameter value)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
NameDescription
indexint
valueGqlQueryParameter
Returns
TypeDescription
GqlQuery.Builder

setPositionalBindings(int index, GqlQueryParameter.Builder builderForValue)

public GqlQuery.Builder setPositionalBindings(int index, GqlQueryParameter.Builder builderForValue)

Numbered binding site @1 references the first numbered parameter, effectively using 1-based indexing, rather than the usual 0. For each binding site numbered i in query_string, there must be an i-th numbered parameter. The inverse must also be true.

repeated .google.datastore.v1.GqlQueryParameter positional_bindings = 4;

Parameters
NameDescription
indexint
builderForValueGqlQueryParameter.Builder
Returns
TypeDescription
GqlQuery.Builder

setQueryString(String value)

public GqlQuery.Builder setQueryString(String value)

A string of the format described here.

string query_string = 1;

Parameter
NameDescription
valueString

The queryString to set.

Returns
TypeDescription
GqlQuery.Builder

This builder for chaining.

setQueryStringBytes(ByteString value)

public GqlQuery.Builder setQueryStringBytes(ByteString value)

A string of the format described here.

string query_string = 1;

Parameter
NameDescription
valueByteString

The bytes for queryString to set.

Returns
TypeDescription
GqlQuery.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public GqlQuery.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
GqlQuery.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final GqlQuery.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
GqlQuery.Builder
Overrides