public static final class Entity.Builder extends GeneratedMessageV3.Builder<Entity.Builder> implements EntityOrBuilder
A Datastore data object.
An entity is limited to 1 megabyte when stored. That roughly
corresponds to a limit of 1 megabyte for the serialized form of this
message.
Protobuf type google.datastore.v1.Entity
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
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()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public Entity.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
Returns
buildPartial()
public Entity buildPartial()
Returns
clear()
public Entity.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public Entity.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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
clearOneof(Descriptors.OneofDescriptor oneof)
public Entity.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearProperties()
public Entity.Builder clearProperties()
Returns
clone()
public Entity.Builder clone()
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Parameter
Returns
getDefaultInstanceForType()
public Entity getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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
Type | Description |
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
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
getMutableProperties()
public Map<String,Value> getMutableProperties()
Use alternate mutation accessors instead.
Returns
getProperties()
public Map<String,Value> getProperties()
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Parameters
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Parameter
Returns
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
Type | Description |
boolean | Whether the key field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(Entity other)
public Entity.Builder mergeFrom(Entity other)
Parameter
Returns
public Entity.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public Entity.Builder mergeFrom(Message other)
Parameter
Returns
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
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final Entity.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Parameter
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Parameters
Returns
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 name must not contain more than 500 characters.
The name cannot be ""
.
map<string, .google.datastore.v1.Value> properties = 3;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public Entity.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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
Returns
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
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public Entity.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final Entity.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides