Class Entity.Builder (2.17.6)

public static final class Entity.Builder extends GeneratedMessageV3.Builder<Entity.Builder> implements EntityOrBuilder

A Datastore data object.

Must not exceed 1 MiB - 4 bytes.

Protobuf type google.datastore.v1.Entity

Implements

EntityOrBuilder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Entity build()
Returns
TypeDescription
Entity

buildPartial()

public Entity buildPartial()
Returns
TypeDescription
Entity

clear()

public Entity.Builder clear()
Returns
TypeDescription
Entity.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearKey()

public Entity.Builder clearKey()

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Returns
TypeDescription
Entity.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearProperties()

public Entity.Builder clearProperties()
Returns
TypeDescription
Entity.Builder

clone()

public Entity.Builder clone()
Returns
TypeDescription
Entity.Builder
Overrides

containsProperties(String key)

public boolean containsProperties(String key)

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public Entity getDefaultInstanceForType()
Returns
TypeDescription
Entity

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getKey()

public Key getKey()

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Returns
TypeDescription
Key

The key.

getKeyBuilder()

public Key.Builder getKeyBuilder()

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Returns
TypeDescription
Key.Builder

getKeyOrBuilder()

public KeyOrBuilder getKeyOrBuilder()

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Returns
TypeDescription
KeyOrBuilder

getMutableProperties()

public Map<String,Value> getMutableProperties()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Value>

getProperties()

public Map<String,Value> getProperties()

Use #getPropertiesMap() instead.

Returns
TypeDescription
Map<String,Value>

getPropertiesCount()

public int getPropertiesCount()

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Returns
TypeDescription
int

getPropertiesMap()

public Map<String,Value> getPropertiesMap()

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Returns
TypeDescription
Map<String,Value>

getPropertiesOrDefault(String key, Value defaultValue)

public Value getPropertiesOrDefault(String key, Value defaultValue)

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Parameters
NameDescription
keyString
defaultValueValue
Returns
TypeDescription
Value

getPropertiesOrThrow(String key)

public Value getPropertiesOrThrow(String key)

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
Value

hasKey()

public boolean hasKey()

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Returns
TypeDescription
boolean

Whether the key field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Entity other)

public Entity.Builder mergeFrom(Entity other)
Parameter
NameDescription
otherEntity
Returns
TypeDescription
Entity.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeKey(Key value)

public Entity.Builder mergeKey(Key value)

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Parameter
NameDescription
valueKey
Returns
TypeDescription
Entity.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

putAllProperties(Map<String,Value> values)

public Entity.Builder putAllProperties(Map<String,Value> values)

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Parameter
NameDescription
valuesMap<String,Value>
Returns
TypeDescription
Entity.Builder

putProperties(String key, Value value)

public Entity.Builder putProperties(String key, Value value)

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Parameters
NameDescription
keyString
valueValue
Returns
TypeDescription
Entity.Builder

removeProperties(String key)

public Entity.Builder removeProperties(String key)

The entity's properties. The map's keys are property names. A property name matching regex .* is reserved. A reserved property name is forbidden in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

map<string, .google.datastore.v1.Value> properties = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
Entity.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setKey(Key value)

public Entity.Builder setKey(Key value)

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Parameter
NameDescription
valueKey
Returns
TypeDescription
Entity.Builder

setKey(Key.Builder builderForValue)

public Entity.Builder setKey(Key.Builder builderForValue)

The entity's key.

An entity must have a key, unless otherwise documented (for example, an entity in Value.entity_value may have no key). An entity's kind is its key path's last element's kind, or null if it has no key.

.google.datastore.v1.Key key = 1;

Parameter
NameDescription
builderForValueKey.Builder
Returns
TypeDescription
Entity.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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