Class AggregationQuery.Builder (2.29.1)

publicstaticfinalclass AggregationQuery.BuilderextendsGeneratedMessageV3.Builder<AggregationQuery.Builder>implementsAggregationQueryOrBuilder

Datastore query for running an aggregation over a Query.

Protobuf type google.datastore.v1.AggregationQuery

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

addAggregations(AggregationQuery.Aggregation value)

publicAggregationQuery.BuilderaddAggregations(AggregationQuery.Aggregationvalue)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

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

addAggregations(AggregationQuery.Aggregation.Builder builderForValue)

publicAggregationQuery.BuilderaddAggregations(AggregationQuery.Aggregation.BuilderbuilderForValue)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

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

addAggregations(int index, AggregationQuery.Aggregation value)

publicAggregationQuery.BuilderaddAggregations(intindex,AggregationQuery.Aggregationvalue)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AggregationQuery.Aggregation
Returns
Type Description
AggregationQuery.Builder

addAggregations(int index, AggregationQuery.Aggregation.Builder builderForValue)

publicAggregationQuery.BuilderaddAggregations(intindex,AggregationQuery.Aggregation.BuilderbuilderForValue)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AggregationQuery.Aggregation.Builder
Returns
Type Description
AggregationQuery.Builder

addAggregationsBuilder()

publicAggregationQuery.Aggregation.BuilderaddAggregationsBuilder()

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AggregationQuery.Aggregation.Builder

addAggregationsBuilder(int index)

publicAggregationQuery.Aggregation.BuilderaddAggregationsBuilder(intindex)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AggregationQuery.Aggregation.Builder

addAllAggregations(Iterable<? extends AggregationQuery.Aggregation> values)

publicAggregationQuery.BuilderaddAllAggregations(Iterable<?extendsAggregationQuery.Aggregation>values)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.datastore.v1.AggregationQuery.Aggregation>
Returns
Type Description
AggregationQuery.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

publicAggregationQuerybuild()
Returns
Type Description
AggregationQuery

buildPartial()

publicAggregationQuerybuildPartial()
Returns
Type Description
AggregationQuery

clear()

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

clearAggregations()

publicAggregationQuery.BuilderclearAggregations()

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AggregationQuery.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearNestedQuery()

publicAggregationQuery.BuilderclearNestedQuery()

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Returns
Type Description
AggregationQuery.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearQueryType()

publicAggregationQuery.BuilderclearQueryType()
Returns
Type Description
AggregationQuery.Builder

clone()

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

getAggregations(int index)

publicAggregationQuery.AggregationgetAggregations(intindex)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AggregationQuery.Aggregation

getAggregationsBuilder(int index)

publicAggregationQuery.Aggregation.BuildergetAggregationsBuilder(intindex)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AggregationQuery.Aggregation.Builder

getAggregationsBuilderList()

publicList<AggregationQuery.Aggregation.Builder>getAggregationsBuilderList()

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getAggregationsCount()

publicintgetAggregationsCount()

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAggregationsList()

publicList<AggregationQuery.Aggregation>getAggregationsList()

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Aggregation>

getAggregationsOrBuilder(int index)

publicAggregationQuery.AggregationOrBuildergetAggregationsOrBuilder(intindex)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AggregationQuery.AggregationOrBuilder

getAggregationsOrBuilderList()

publicList<?extendsAggregationQuery.AggregationOrBuilder>getAggregationsOrBuilderList()

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.datastore.v1.AggregationQuery.AggregationOrBuilder>

getDefaultInstanceForType()

publicAggregationQuerygetDefaultInstanceForType()
Returns
Type Description
AggregationQuery

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getNestedQuery()

publicQuerygetNestedQuery()

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Returns
Type Description
Query

The nestedQuery.

getNestedQueryBuilder()

publicQuery.BuildergetNestedQueryBuilder()

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Returns
Type Description
Query.Builder

getNestedQueryOrBuilder()

publicQueryOrBuildergetNestedQueryOrBuilder()

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Returns
Type Description
QueryOrBuilder

getQueryTypeCase()

publicAggregationQuery.QueryTypeCasegetQueryTypeCase()
Returns
Type Description
AggregationQuery.QueryTypeCase

hasNestedQuery()

publicbooleanhasNestedQuery()

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Returns
Type Description
boolean

Whether the nestedQuery field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(AggregationQuery other)

publicAggregationQuery.BuildermergeFrom(AggregationQueryother)
Parameter
Name Description
other AggregationQuery
Returns
Type Description
AggregationQuery.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNestedQuery(Query value)

publicAggregationQuery.BuildermergeNestedQuery(Queryvalue)

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Parameter
Name Description
value Query
Returns
Type Description
AggregationQuery.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeAggregations(int index)

publicAggregationQuery.BuilderremoveAggregations(intindex)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AggregationQuery.Builder

setAggregations(int index, AggregationQuery.Aggregation value)

publicAggregationQuery.BuildersetAggregations(intindex,AggregationQuery.Aggregationvalue)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AggregationQuery.Aggregation
Returns
Type Description
AggregationQuery.Builder

setAggregations(int index, AggregationQuery.Aggregation.Builder builderForValue)

publicAggregationQuery.BuildersetAggregations(intindex,AggregationQuery.Aggregation.BuilderbuilderForValue)

Optional. Series of aggregations to apply over the results of the nested_query.

Requires:

  • A minimum of one and maximum of five aggregations per query.

repeated .google.datastore.v1.AggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AggregationQuery.Aggregation.Builder
Returns
Type Description
AggregationQuery.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setNestedQuery(Query value)

publicAggregationQuery.BuildersetNestedQuery(Queryvalue)

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Parameter
Name Description
value Query
Returns
Type Description
AggregationQuery.Builder

setNestedQuery(Query.Builder builderForValue)

publicAggregationQuery.BuildersetNestedQuery(Query.BuilderbuilderForValue)

Nested query for aggregation

.google.datastore.v1.Query nested_query = 1;

Parameter
Name Description
builderForValue Query.Builder
Returns
Type Description
AggregationQuery.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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