Package com.google.cloud.datastore
Class Entity
- java.lang.Object
-
- com.google.cloud.datastore.BaseEntity<K>
-
- com.google.cloud.datastore.FullEntity<Key>
-
- com.google.cloud.datastore.Entity
-
- All Implemented Interfaces:
Serializable
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 completeKey.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntity.Builder
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intcalculateSerializedSize(BaseEntity<? extends IncompleteKey> entity)Returns the size in bytes of the protobuf form of the provided entity.static EntityfromPb(Entity entityPb)static Entity.BuildernewBuilder(Entity copyFrom)static Entity.BuildernewBuilder(Key key)static Entity.BuildernewBuilder(Key key, FullEntity<?> copyFrom)-
Methods inherited from class com.google.cloud.datastore.FullEntity
newBuilder, newBuilder, newBuilder
-
-
-
-
Method Detail
-
newBuilder
public static Entity.Builder newBuilder(Key key)
-
newBuilder
public static Entity.Builder newBuilder(Entity copyFrom)
-
newBuilder
public static Entity.Builder newBuilder(Key key, FullEntity<?> copyFrom)
-
calculateSerializedSize
public static int calculateSerializedSize(BaseEntity<? extends IncompleteKey> entity)
Returns the size in bytes of the protobuf form of the provided entity.- Parameters:
entity- object whose size is measured.
-
-