Package com.googlecode.objectify.impl
Class PropertyPopulator<P,D>
java.lang.Object
com.googlecode.objectify.impl.PropertyPopulator<P,D>
- All Implemented Interfaces:
Populator<P>
Associates a Property with a Translator and provides a more convenient interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.google.cloud.datastore.Value<D>
getValue
(Object pojo, SaveContext ctx, Path containerPath) Get the value for the property and translate it into datastore format.void
load
(com.google.cloud.datastore.FullEntity<?> container, LoadContext ctx, Path containerPath, P intoPojo) Gets the appropriate value from the container and sets it on the appropriate field of the pojo.void
save
(P onPojo, boolean index, SaveContext ctx, Path containerPath, com.google.cloud.datastore.FullEntity.Builder<?> into) Gets the appropriate field value from the pojo and puts it in the container at the appropriate prop name and with the appropriate indexing.void
setValue
(Object pojo, com.google.cloud.datastore.Value<D> value, LoadContext ctx, Path containerPath) Set this raw datastore value on the relevant property of the pojo, doing whatever translations are necessary.toString()
This is easier to debug if we have a string value
-
Constructor Details
-
PropertyPopulator
public PropertyPopulator()
-
-
Method Details
-
getLoadConditions
-
toString
This is easier to debug if we have a string value -
load
public void load(com.google.cloud.datastore.FullEntity<?> container, LoadContext ctx, Path containerPath, P intoPojo) Gets the appropriate value from the container and sets it on the appropriate field of the pojo. -
setValue
public void setValue(Object pojo, com.google.cloud.datastore.Value<D> value, LoadContext ctx, Path containerPath) throws SkipException Set this raw datastore value on the relevant property of the pojo, doing whatever translations are necessary.- Throws:
SkipException
-
save
public void save(P onPojo, boolean index, SaveContext ctx, Path containerPath, com.google.cloud.datastore.FullEntity.Builder<?> into) Gets the appropriate field value from the pojo and puts it in the container at the appropriate prop name and with the appropriate indexing. -
getValue
public com.google.cloud.datastore.Value<D> getValue(Object pojo, SaveContext ctx, Path containerPath) Get the value for the property and translate it into datastore format.
-