public interface KeyMetadata<T>
Modifier and Type | Method and Description |
---|---|
String |
getIdFieldName() |
Class<?> |
getIdFieldType() |
String |
getKind() |
String |
getParentFieldName() |
com.google.appengine.api.datastore.Key |
getRawKey(T pojo)
Gets a key composed of the relevant id and parent fields in the object.
|
boolean |
hasParentField() |
com.google.appengine.api.datastore.Entity |
initEntity(T pojo)
This hides all the messiness of trying to create an Entity from an object that:
|
boolean |
isIdGeneratable() |
void |
setKey(T pojo,
com.google.appengine.api.datastore.Key key,
LoadContext ctx)
Sets the key onto the POJO id/parent fields
|
void |
setLongId(T pojo,
Long id)
Sets the numeric id field
|
boolean |
shouldLoadParent(Set<Class<?>> enabledGroups) |
void setKey(T pojo, com.google.appengine.api.datastore.Key key, LoadContext ctx)
String getKind()
com.google.appengine.api.datastore.Entity initEntity(T pojo)
This hides all the messiness of trying to create an Entity from an object that:
com.google.appengine.api.datastore.Key getRawKey(T pojo)
pojo
- must be of the entityClass type for this metadata.IllegalArgumentException
- if pojo has a null idString getParentFieldName()
String getIdFieldName()
Class<?> getIdFieldType()
boolean hasParentField()
boolean shouldLoadParent(Set<Class<?>> enabledGroups)
boolean isIdGeneratable()
Copyright © 2014. All rights reserved.