Class Entity (2.18.5)

publicfinalclass EntityextendsFullEntity<Key>

An entity is the Google Cloud Datastore persistent data object for a specific key. An entity will always have a complete Key.

Inheritance

java.lang.Object > BaseEntity > FullEntity > Entity

Inherited Members

Static Methods

calculateSerializedSize(BaseEntity<? extends IncompleteKey> entity)

publicstaticintcalculateSerializedSize(BaseEntity<?extendsIncompleteKey>entity)

Returns the size in bytes of the protobuf form of the provided entity.

Parameter
Name Description
entity BaseEntity<? extends com.google.cloud.datastore.IncompleteKey>

object whose size is measured.

Returns
Type Description
int

fromPb(Entity entityPb)

publicstaticEntityfromPb(EntityentityPb)
Parameter
Name Description
entityPb Entity
Returns
Type Description
Entity

newBuilder(Entity copyFrom)

publicstaticEntity.BuildernewBuilder(EntitycopyFrom)
Parameter
Name Description
copyFrom Entity
Returns
Type Description
Entity.Builder

newBuilder(Key key)

publicstaticEntity.BuildernewBuilder(Keykey)
Parameter
Name Description
key Key
Returns
Type Description
Entity.Builder

newBuilder(Key key, FullEntity<?> copyFrom)

publicstaticEntity.BuildernewBuilder(Keykey,FullEntity<?>copyFrom)
Parameters
Name Description
key Key
copyFrom FullEntity<?>
Returns
Type Description
Entity.Builder

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月19日 UTC.