public static final class Entity.Builder extends GeneratedMessage.Builder<Entity.Builder> implements EntityOrBuilderA Datastore data object.
Must not exceed 1 MiB - 4 bytes.
Protobuf type google.datastore.v1.Entity
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > Entity.BuilderImplements
EntityOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public Entity build()| Returns | |
|---|---|
| Type | Description |
Entity |
|
buildPartial()
public Entity buildPartial()| Returns | |
|---|---|
| Type | Description |
Entity |
|
clear()
public Entity.Builder clear()| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
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 | |
|---|---|
| Type | Description |
Entity.Builder |
|
clearProperties()
public Entity.Builder clearProperties()| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
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 | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
public Entity getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
Entity |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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 | |
|---|---|
| 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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
KeyOrBuilder |
|
getMutableProperties() (deprecated)
public Map<String,Value> getMutableProperties()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,Value> |
|
getProperties() (deprecated)
public Map<String,Value> getProperties()Use #getPropertiesMap() instead.
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
Value |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
boolean |
Whether the key field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(Entity other)
public Entity.Builder mergeFrom(Entity other)| Parameter | |
|---|---|
| Name | Description |
other |
Entity |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public Entity.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public Entity.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
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 | |
|---|---|
| Name | Description |
value |
Key |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
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 | |
|---|---|
| Name | Description |
values |
Map<String,Value> |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
key |
String |
value |
Value |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
putPropertiesBuilderIfAbsent(String key)
public Value.Builder putPropertiesBuilderIfAbsent(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 | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
Value.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 | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|
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 | |
|---|---|
| Name | Description |
value |
Key |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
builderForValue |
Key.Builder |
| Returns | |
|---|---|
| Type | Description |
Entity.Builder |
|