Class AggregationQuery.Aggregation.Builder (2.14.1)

public static final class AggregationQuery.Aggregation.Builder extends GeneratedMessageV3.Builder<AggregationQuery.Aggregation.Builder> implements AggregationQuery.AggregationOrBuilder

Defines a aggregation that produces a single result.

Protobuf type google.datastore.v1.AggregationQuery.Aggregation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AggregationQuery.Aggregation build()
Returns
TypeDescription
AggregationQuery.Aggregation

buildPartial()

public AggregationQuery.Aggregation buildPartial()
Returns
TypeDescription
AggregationQuery.Aggregation

clear()

public AggregationQuery.Aggregation.Builder clear()
Returns
TypeDescription
AggregationQuery.Aggregation.Builder
Overrides

clearAlias()

public AggregationQuery.Aggregation.Builder clearAlias()

Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format property_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
AggregationQuery.Aggregation.Builder

This builder for chaining.

clearCount()

public AggregationQuery.Aggregation.Builder clearCount()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
AggregationQuery.Aggregation.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearOperator()

public AggregationQuery.Aggregation.Builder clearOperator()
Returns
TypeDescription
AggregationQuery.Aggregation.Builder

clone()

public AggregationQuery.Aggregation.Builder clone()
Returns
TypeDescription
AggregationQuery.Aggregation.Builder
Overrides

getAlias()

public String getAlias()

Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format property_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The alias.

getAliasBytes()

public ByteString getAliasBytes()

Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format property_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for alias.

getCount()

public AggregationQuery.Aggregation.Count getCount()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
AggregationQuery.Aggregation.Count

The count.

getCountBuilder()

public AggregationQuery.Aggregation.Count.Builder getCountBuilder()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
AggregationQuery.Aggregation.Count.Builder

getCountOrBuilder()

public AggregationQuery.Aggregation.CountOrBuilder getCountOrBuilder()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
AggregationQuery.Aggregation.CountOrBuilder

getDefaultInstanceForType()

public AggregationQuery.Aggregation getDefaultInstanceForType()
Returns
TypeDescription
AggregationQuery.Aggregation

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOperatorCase()

public AggregationQuery.Aggregation.OperatorCase getOperatorCase()
Returns
TypeDescription
AggregationQuery.Aggregation.OperatorCase

hasCount()

public boolean hasCount()

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Returns
TypeDescription
boolean

Whether the count field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeCount(AggregationQuery.Aggregation.Count value)

public AggregationQuery.Aggregation.Builder mergeCount(AggregationQuery.Aggregation.Count value)

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Parameter
NameDescription
valueAggregationQuery.Aggregation.Count
Returns
TypeDescription
AggregationQuery.Aggregation.Builder

mergeFrom(AggregationQuery.Aggregation other)

public AggregationQuery.Aggregation.Builder mergeFrom(AggregationQuery.Aggregation other)
Parameter
NameDescription
otherAggregationQuery.Aggregation
Returns
TypeDescription
AggregationQuery.Aggregation.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAlias(String value)

public AggregationQuery.Aggregation.Builder setAlias(String value)

Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format property_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The alias to set.

Returns
TypeDescription
AggregationQuery.Aggregation.Builder

This builder for chaining.

setAliasBytes(ByteString value)

public AggregationQuery.Aggregation.Builder setAliasBytes(ByteString value)

Optional. Optional name of the property to store the result of the aggregation. If not provided, Datastore will pick a default name following the format property_<incremental_id++>. For example: <code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2), COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) OVER ( ... ); </code></code><code> becomes: </code><code><code> AGGREGATE COUNT_UP_TO(1) AS count_up_to_1, COUNT_UP_TO(2) AS property_1, COUNT_UP_TO(3) AS count_up_to_3, COUNT_UP_TO(4) AS property_2 OVER ( ... ); </code></code> Requires:

  • Must be unique across all aggregation aliases.
  • Conform to entity property name limitations.

string alias = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for alias to set.

Returns
TypeDescription
AggregationQuery.Aggregation.Builder

This builder for chaining.

setCount(AggregationQuery.Aggregation.Count value)

public AggregationQuery.Aggregation.Builder setCount(AggregationQuery.Aggregation.Count value)

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Parameter
NameDescription
valueAggregationQuery.Aggregation.Count
Returns
TypeDescription
AggregationQuery.Aggregation.Builder

setCount(AggregationQuery.Aggregation.Count.Builder builderForValue)

public AggregationQuery.Aggregation.Builder setCount(AggregationQuery.Aggregation.Count.Builder builderForValue)

Count aggregator.

.google.datastore.v1.AggregationQuery.Aggregation.Count count = 1;

Parameter
NameDescription
builderForValueAggregationQuery.Aggregation.Count.Builder
Returns
TypeDescription
AggregationQuery.Aggregation.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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