Class AggregationResult.Builder (2.18.5)

public static final class AggregationResult.Builder extends GeneratedMessageV3.Builder<AggregationResult.Builder> implements AggregationResultOrBuilder

The result of a single bucket from a Datastore aggregation query.

The keys of aggregate_properties are the same for all results in an aggregation query, unlike entity queries which can have different fields present for each result.

Protobuf type google.datastore.v1.AggregationResult

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AggregationResult build()
Returns
TypeDescription
AggregationResult

buildPartial()

public AggregationResult buildPartial()
Returns
TypeDescription
AggregationResult

clear()

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

clearAggregateProperties()

public AggregationResult.Builder clearAggregateProperties()
Returns
TypeDescription
AggregationResult.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

containsAggregateProperties(String key)

public boolean containsAggregateProperties(String key)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAggregateProperties()

public Map<String,Value> getAggregateProperties()
Returns
TypeDescription
Map<String,Value>

getAggregatePropertiesCount()

public int getAggregatePropertiesCount()

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Returns
TypeDescription
int

getAggregatePropertiesMap()

public Map<String,Value> getAggregatePropertiesMap()

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Returns
TypeDescription
Map<String,Value>

getAggregatePropertiesOrDefault(String key, Value defaultValue)

public Value getAggregatePropertiesOrDefault(String key, Value defaultValue)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameters
NameDescription
keyString
defaultValueValue
Returns
TypeDescription
Value

getAggregatePropertiesOrThrow(String key)

public Value getAggregatePropertiesOrThrow(String key)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
Value

getDefaultInstanceForType()

public AggregationResult getDefaultInstanceForType()
Returns
TypeDescription
AggregationResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMutableAggregateProperties()

public Map<String,Value> getMutableAggregateProperties()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Value>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(AggregationResult other)

public AggregationResult.Builder mergeFrom(AggregationResult other)
Parameter
NameDescription
otherAggregationResult
Returns
TypeDescription
AggregationResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAggregateProperties(String key, Value value)

public AggregationResult.Builder putAggregateProperties(String key, Value value)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameters
NameDescription
keyString
valueValue
Returns
TypeDescription
AggregationResult.Builder

putAggregatePropertiesBuilderIfAbsent(String key)

public Value.Builder putAggregatePropertiesBuilderIfAbsent(String key)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
Value.Builder

putAllAggregateProperties(Map<String,Value> values)

public AggregationResult.Builder putAllAggregateProperties(Map<String,Value> values)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameter
NameDescription
valuesMap<String,Value>
Returns
TypeDescription
AggregationResult.Builder

removeAggregateProperties(String key)

public AggregationResult.Builder removeAggregateProperties(String key)

The result of the aggregation functions, ex: COUNT(*) AS total_entities.

The key is the alias assigned to the aggregation function on input and the size of this map equals the number of aggregation functions in the query.

map<string, .google.datastore.v1.Value> aggregate_properties = 2;

Parameter
NameDescription
keyString
Returns
TypeDescription
AggregationResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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