Class AggregationQuery (2.27.1)

publicfinalclass AggregationQueryextendsGeneratedMessageV3implementsAggregationQueryOrBuilder

Datastore query for running an aggregation over a Query.

Protobuf type google.datastore.v1.AggregationQuery

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

AGGREGATIONS_FIELD_NUMBER

publicstaticfinalintAGGREGATIONS_FIELD_NUMBER
Field Value
Type Description
int

NESTED_QUERY_FIELD_NUMBER

publicstaticfinalintNESTED_QUERY_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticAggregationQuerygetDefaultInstance()
Returns
Type Description
AggregationQuery

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticAggregationQuery.BuildernewBuilder()
Returns
Type Description
AggregationQuery.Builder

newBuilder(AggregationQuery prototype)

publicstaticAggregationQuery.BuildernewBuilder(AggregationQueryprototype)
Parameter
Name Description
prototype AggregationQuery
Returns
Type Description
AggregationQuery.Builder

parseDelimitedFrom(InputStream input)

publicstaticAggregationQueryparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
AggregationQuery
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAggregationQueryparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticAggregationQueryparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
AggregationQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticAggregationQueryparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticAggregationQueryparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
AggregationQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticAggregationQueryparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticAggregationQueryparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AggregationQuery
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAggregationQueryparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticAggregationQueryparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
AggregationQuery
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticAggregationQueryparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticAggregationQueryparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AggregationQuery
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticAggregationQueryparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AggregationQuery
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<AggregationQuery>parser()
Returns
Type Description
Parser<AggregationQuery>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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

getNestedQuery()

publicQuerygetNestedQuery()

Nested query for aggregation

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

Returns
Type Description
Query

The nestedQuery.

getNestedQueryOrBuilder()

publicQueryOrBuildergetNestedQueryOrBuilder()

Nested query for aggregation

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

Returns
Type Description
QueryOrBuilder

getParserForType()

publicParser<AggregationQuery>getParserForType()
Returns
Type Description
Parser<AggregationQuery>
Overrides

getQueryTypeCase()

publicAggregationQuery.QueryTypeCasegetQueryTypeCase()
Returns
Type Description
AggregationQuery.QueryTypeCase

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

hasNestedQuery()

publicbooleanhasNestedQuery()

Nested query for aggregation

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

Returns
Type Description
boolean

Whether the nestedQuery field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicAggregationQuery.BuildernewBuilderForType()
Returns
Type Description
AggregationQuery.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedAggregationQuery.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AggregationQuery.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicAggregationQuery.BuildertoBuilder()
Returns
Type Description
AggregationQuery.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.