Package com.googlecode.objectify.impl
Class EntityMetadata<P>
java.lang.Object
com.googlecode.objectify.impl.EntityMetadata<P>
Holds basic information about POJO entities, and can translate back and forth to the
datastore representation.
- Author:
- Jeff Schnitzer invalid input: '<'[email protected]>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the expiry associated with this kind, defined by the @Cached annotation.load
(com.google.cloud.datastore.BaseEntity<?> ent, LoadContext ctx) Converts an entity to an object of the appropriate type for this metadata structure.com.google.cloud.datastore.FullEntity
<?> save
(P pojo, SaveContext ctx) Converts an object to a datastore Entity with the appropriate Key type.
-
Constructor Details
-
EntityMetadata
- Parameters:
clazz
- must have @Entity in its hierarchy
-
-
Method Details
-
getCacheExpirySeconds
Get the expiry associated with this kind, defined by the @Cached annotation. For polymorphic types, this is always the instruction on the root @Entity - you cannot provide per-type caching.- Returns:
- null means DO NOT CACHE, 0 means "no limit", otherwise # of seconds
-
load
Converts an entity to an object of the appropriate type for this metadata structure. Does not check that the entity is appropriate; that should be done when choosing which EntityMetadata to call. -
save
Converts an object to a datastore Entity with the appropriate Key type.
-