Package com.googlecode.objectify.impl
Class KeyPopulator<P>
java.lang.Object
com.googlecode.objectify.impl.KeyPopulator<P>
- All Implemented Interfaces:
Populator<P>
Populates the @Id/@Parent fields from an Entity key
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
load
(com.google.cloud.datastore.FullEntity<?> container, LoadContext ctx, Path containerPath, P intoPojo) Loads the content of the specified datastore node into an existing POJO.void
save
(P onPojo, boolean index, SaveContext ctx, Path containerPath, com.google.cloud.datastore.FullEntity.Builder<?> into) Saves data from the POJO into the entity builder.
-
Constructor Details
-
KeyPopulator
-
-
Method Details
-
load
public void load(com.google.cloud.datastore.FullEntity<?> container, LoadContext ctx, Path containerPath, P intoPojo) Description copied from interface:Populator
Loads the content of the specified datastore node into an existing POJO.
-
save
public void save(P onPojo, boolean index, SaveContext ctx, Path containerPath, com.google.cloud.datastore.FullEntity.Builder<?> into) Description copied from interface:Populator
Saves data from the POJO into the entity builder.- Specified by:
save
in interfacePopulator<P>
- Parameters:
onPojo
- is an object from the pojo entity graph; possibly the whole graph or possibly just a leaf field.index
- is whether the instruction so far is to index or not index property valuescontainerPath
- is the path that we have taken to get here, which could be long due to re-entrant translators (ie, an embedded pojo that also has a reference to the same class).
-