Class ProjectionSafeTranslator<P,D>
java.lang.Object
com.googlecode.objectify.impl.translate.NullSafeTranslator<P,D>
com.googlecode.objectify.impl.translate.ProjectionSafeTranslator<P,D>
- All Implemented Interfaces:
Translator<P,D>
- Direct Known Subclasses:
ValueTranslator
public abstract class ProjectionSafeTranslator<P,D> extends NullSafeTranslator<P,D>
Watches out for RawValue and performs the necessary conversion if we get one. This will happen during projection queries.
- Author:
- Jeff Schnitzer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected P
loadSafe(D value, LoadContext ctx, Path path)
Implement this, returning a proper translated valueprotected abstract P
loadSafe2(D value, LoadContext ctx, Path path)
Decode from a property value as stored in the datastore to a type that will be stored in a pojo.Methods inherited from class com.googlecode.objectify.impl.translate.NullSafeTranslator
load, save, saveSafe
-
Constructor Details
-
ProjectionSafeTranslator
-
-
Method Details
-
loadSafe
Description copied from class:NullSafeTranslator
Implement this, returning a proper translated value- Specified by:
loadSafe
in classNullSafeTranslator<P,D>
- Parameters:
value
- will never be null- Throws:
SkipException
-
loadSafe2
Decode from a property value as stored in the datastore to a type that will be stored in a pojo.- Parameters:
value
- will not be null and will not be RawValue- Returns:
- the format which should be stored in the pojo; a null means store a literal null!
- Throws:
SkipException
- if this field subtree should be skipped
-