Class AggregationResult.Builder (2.25.2)

publicstaticfinalclass AggregationResult.BuilderextendsGeneratedMessageV3.Builder<AggregationResult.Builder>implementsAggregationResultOrBuilder

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

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicAggregationResult.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AggregationResult.Builder
Overrides

build()

publicAggregationResultbuild()
Returns
Type Description
AggregationResult

buildPartial()

publicAggregationResultbuildPartial()
Returns
Type Description
AggregationResult

clear()

publicAggregationResult.Builderclear()
Returns
Type Description
AggregationResult.Builder
Overrides

clearAggregateProperties()

publicAggregationResult.BuilderclearAggregateProperties()
Returns
Type Description
AggregationResult.Builder

clearField(Descriptors.FieldDescriptor field)

publicAggregationResult.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AggregationResult.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicAggregationResult.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AggregationResult.Builder
Overrides

clone()

publicAggregationResult.Builderclone()
Returns
Type Description
AggregationResult.Builder
Overrides

containsAggregateProperties(String key)

publicbooleancontainsAggregateProperties(Stringkey)

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
Name Description
key String
Returns
Type Description
boolean

getAggregateProperties() (deprecated)

publicMap<String,Value>getAggregateProperties()
Returns
Type Description
Map<String,Value>

getAggregatePropertiesCount()

publicintgetAggregatePropertiesCount()

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
Type Description
int

getAggregatePropertiesMap()

publicMap<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
Type Description
Map<String,Value>

getAggregatePropertiesOrDefault(String key, Value defaultValue)

publicValuegetAggregatePropertiesOrDefault(Stringkey,ValuedefaultValue)

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
Name Description
key String
defaultValue Value
Returns
Type Description
Value

getAggregatePropertiesOrThrow(String key)

publicValuegetAggregatePropertiesOrThrow(Stringkey)

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
Name Description
key String
Returns
Type Description
Value

getDefaultInstanceForType()

publicAggregationResultgetDefaultInstanceForType()
Returns
Type Description
AggregationResult

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableAggregateProperties() (deprecated)

publicMap<String,Value>getMutableAggregateProperties()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Value>

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AggregationResult other)

publicAggregationResult.BuildermergeFrom(AggregationResultother)
Parameter
Name Description
other AggregationResult
Returns
Type Description
AggregationResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicAggregationResult.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationResult.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicAggregationResult.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
AggregationResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalAggregationResult.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AggregationResult.Builder
Overrides

putAggregateProperties(String key, Value value)

publicAggregationResult.BuilderputAggregateProperties(Stringkey,Valuevalue)

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
Name Description
key String
value Value
Returns
Type Description
AggregationResult.Builder

putAggregatePropertiesBuilderIfAbsent(String key)

publicValue.BuilderputAggregatePropertiesBuilderIfAbsent(Stringkey)

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
Name Description
key String
Returns
Type Description
Value.Builder

putAllAggregateProperties(Map<String,Value> values)

publicAggregationResult.BuilderputAllAggregateProperties(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
Name Description
values Map<String,Value>
Returns
Type Description
AggregationResult.Builder

removeAggregateProperties(String key)

publicAggregationResult.BuilderremoveAggregateProperties(Stringkey)

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
Name Description
key String
Returns
Type Description
AggregationResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicAggregationResult.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AggregationResult.Builder
Overrides

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

publicAggregationResult.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AggregationResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalAggregationResult.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AggregationResult.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.