Class AggregationQuery.Aggregation.Sum.Builder (2.18.5)

publicstaticfinalclass AggregationQuery.Aggregation.Sum.BuilderextendsGeneratedMessageV3.Builder<AggregationQuery.Aggregation.Sum.Builder>implementsAggregationQuery.Aggregation.SumOrBuilder

Sum of the values of the requested property.

  • Only numeric values will be aggregated. All non-numeric values including NULL are skipped.

  • If the aggregated values contain NaN, returns NaN. Infinity math follows IEEE-754 standards.

  • If the aggregated value set is empty, returns 0.

  • Returns a 64-bit integer if all aggregated numbers are integers and the sum result does not overflow. Otherwise, the result is returned as a double. Note that even if all the aggregated values are integers, the result is returned as a double if it cannot fit within a 64-bit signed integer. When this occurs, the returned value will lose precision.

  • When underflow occurs, floating-point aggregation is non-deterministic. This means that running the same query repeatedly without any changes to the underlying values could produce slightly different results each time. In those cases, values should be stored as integers over floating-point numbers.

Protobuf type google.datastore.v1.AggregationQuery.Aggregation.Sum

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)

publicAggregationQuery.Aggregation.Sum.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

build()

publicAggregationQuery.Aggregation.Sumbuild()
Returns
Type Description
AggregationQuery.Aggregation.Sum

buildPartial()

publicAggregationQuery.Aggregation.SumbuildPartial()
Returns
Type Description
AggregationQuery.Aggregation.Sum

clear()

publicAggregationQuery.Aggregation.Sum.Builderclear()
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicAggregationQuery.Aggregation.Sum.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicAggregationQuery.Aggregation.Sum.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

clearProperty()

publicAggregationQuery.Aggregation.Sum.BuilderclearProperty()

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder

clone()

publicAggregationQuery.Aggregation.Sum.Builderclone()
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

getDefaultInstanceForType()

publicAggregationQuery.Aggregation.SumgetDefaultInstanceForType()
Returns
Type Description
AggregationQuery.Aggregation.Sum

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getProperty()

publicPropertyReferencegetProperty()

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Returns
Type Description
PropertyReference

The property.

getPropertyBuilder()

publicPropertyReference.BuildergetPropertyBuilder()

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Returns
Type Description
PropertyReference.Builder

getPropertyOrBuilder()

publicPropertyReferenceOrBuildergetPropertyOrBuilder()

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Returns
Type Description
PropertyReferenceOrBuilder

hasProperty()

publicbooleanhasProperty()

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Returns
Type Description
boolean

Whether the property field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AggregationQuery.Aggregation.Sum other)

publicAggregationQuery.Aggregation.Sum.BuildermergeFrom(AggregationQuery.Aggregation.Sumother)
Parameter
Name Description
other AggregationQuery.Aggregation.Sum
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicAggregationQuery.Aggregation.Sum.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicAggregationQuery.Aggregation.Sum.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

mergeProperty(PropertyReference value)

publicAggregationQuery.Aggregation.Sum.BuildermergeProperty(PropertyReferencevalue)

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Parameter
Name Description
value PropertyReference
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalAggregationQuery.Aggregation.Sum.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

publicAggregationQuery.Aggregation.Sum.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

setProperty(PropertyReference value)

publicAggregationQuery.Aggregation.Sum.BuildersetProperty(PropertyReferencevalue)

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Parameter
Name Description
value PropertyReference
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder

setProperty(PropertyReference.Builder builderForValue)

publicAggregationQuery.Aggregation.Sum.BuildersetProperty(PropertyReference.BuilderbuilderForValue)

The property to aggregate on.

.google.datastore.v1.PropertyReference property = 1;

Parameter
Name Description
builderForValue PropertyReference.Builder
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder

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

publicAggregationQuery.Aggregation.Sum.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
AggregationQuery.Aggregation.Sum.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalAggregationQuery.Aggregation.Sum.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
AggregationQuery.Aggregation.Sum.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.