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.
|
Class<P> |
getEntityClass()
Gets the class associated with this entity.
|
KeyMetadata<P> |
getKeyMetadata()
Get specific metadata about the key for this type.
|
Translator<P,com.google.appengine.api.datastore.PropertyContainer> |
getTranslator()
= * @return the translator that will convert between native datastore representation and pojo for this type.
|
P |
load(com.google.appengine.api.datastore.Entity ent,
LoadContext ctx)
Converts an entity to an object of the appropriate type for this metadata structure.
|
com.google.appengine.api.datastore.Entity |
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.appengine.api.datastore.Entity ent, LoadContext ctx)
public com.google.appengine.api.datastore.Entity save(P pojo, SaveContext ctx)
public KeyMetadata<P> getKeyMetadata()
public Translator<P,com.google.appengine.api.datastore.PropertyContainer> getTranslator()
Copyright © 2017. All rights reserved.