public final class Entity extends FullEntity<Key>
An entity is the Google Cloud Datastore persistent data object for a specific key. An entity will always have a complete Key.
Static Methods
calculateSerializedSize(BaseEntity<? extends IncompleteKey> entity)
public static int calculateSerializedSize(BaseEntity<? extends IncompleteKey> entity)
Returns the size in bytes of the protobuf form of the provided entity.
Name | Description |
entity | BaseEntity<? extends com.google.cloud.datastore.IncompleteKey> object whose size is measured. |
Type | Description |
int |
fromPb(Entity entityPb)
public static Entity fromPb(Entity entityPb)
Name | Description |
entityPb | Entity |
Type | Description |
Entity |
newBuilder(Entity copyFrom)
public static Entity.Builder newBuilder(Entity copyFrom)
Name | Description |
copyFrom | Entity |
Type | Description |
Entity.Builder |
newBuilder(Key key)
public static Entity.Builder newBuilder(Key key)
Name | Description |
key | Key |
Type | Description |
Entity.Builder |
newBuilder(Key key, FullEntity<?> copyFrom)
public static Entity.Builder newBuilder(Key key, FullEntity<?> copyFrom)
Name | Description |
key | Key |
copyFrom | FullEntity<?> |
Type | Description |
Entity.Builder |