Class Entity (2.23.0)

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.

Inheritance

java.lang.Object > BaseEntity > FullEntity > Entity

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.

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

object whose size is measured.

Returns
Type Description
int

fromPb(Entity entityPb)

public static Entity fromPb(Entity entityPb)
Parameter
Name Description
entityPb Entity
Returns
Type Description
Entity

newBuilder(Entity copyFrom)

public static Entity.Builder newBuilder(Entity copyFrom)
Parameter
Name Description
copyFrom Entity
Returns
Type Description
Entity.Builder

newBuilder(Key key)

public static Entity.Builder newBuilder(Key key)
Parameter
Name Description
key Key
Returns
Type Description
Entity.Builder

newBuilder(Key key, FullEntity<?> copyFrom)

public static Entity.Builder newBuilder(Key key, FullEntity<?> copyFrom)
Parameters
Name Description
key Key
copyFrom FullEntity<?>
Returns
Type Description
Entity.Builder