public final class Entity extends GeneratedMessageV3 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
Static Fields
KEY_FIELD_NUMBER
public static final int KEY_FIELD_NUMBER
Field Value
PROPERTIES_FIELD_NUMBER
public static final int PROPERTIES_FIELD_NUMBER
Field Value
Static Methods
getDefaultInstance()
public static Entity getDefaultInstance()
Returns
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
newBuilder()
public static Entity.Builder newBuilder()
Returns
newBuilder(Entity prototype)
public static Entity.Builder newBuilder(Entity prototype)
Parameter
Name | Description |
prototype | Entity
|
Returns
public static Entity parseDelimitedFrom(InputStream input)
Parameter
Returns
Exceptions
public static Entity parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(byte[] data)
public static Entity parseFrom(byte[] data)
Parameter
Name | Description |
data | byte[]
|
Returns
Exceptions
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Entity parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteString data)
public static Entity parseFrom(ByteString data)
Parameter
Returns
Exceptions
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Entity parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Entity parseFrom(CodedInputStream input)
Parameter
Returns
Exceptions
public static Entity parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
public static Entity parseFrom(InputStream input)
Parameter
Returns
Exceptions
public static Entity parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parseFrom(ByteBuffer data)
public static Entity parseFrom(ByteBuffer data)
Parameter
Returns
Exceptions
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Entity parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Exceptions
parser()
public static Parser<Entity> parser()
Returns
Methods
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
equals(Object obj)
public boolean equals(Object obj)
Parameter
Returns
Overrides
getDefaultInstanceForType()
public Entity getDefaultInstanceForType()
Returns
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.
|
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
getParserForType()
public Parser<Entity> getParserForType()
Returns
Overrides
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
getSerializedSize()
public int getSerializedSize()
Returns
Overrides
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns
Overrides
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.
|
hashCode()
Returns
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
newBuilderForType()
public Entity.Builder newBuilderForType()
Returns
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Entity.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Returns
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Returns
Overrides
toBuilder()
public Entity.Builder toBuilder()
Returns
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter
Overrides
Exceptions