public class EntityMetadata<P> extends Object
Constructor and Description |
---|
EntityMetadata(ObjectifyFactory fact,
Class<P> clazz) |
Modifier and Type | Method and Description |
---|---|
Integer |
getCacheExpirySeconds()
Get the expiry associated with this kind, defined by the @Cached annotation.
|
P |
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.
|
public EntityMetadata(ObjectifyFactory fact, Class<P> clazz)
clazz
- must have @Entity in its hierarchypublic Integer getCacheExpirySeconds()
public P load(com.google.cloud.datastore.BaseEntity<?> ent, LoadContext ctx)
public com.google.cloud.datastore.FullEntity<?> save(P pojo, SaveContext ctx)
Copyright © 2018. All rights reserved.