Class ReadableInstantTranslatorFactory
- java.lang.Object
-
- com.googlecode.objectify.impl.translate.ValueTranslatorFactory<org.joda.time.ReadableInstant,com.google.cloud.Timestamp>
-
- com.googlecode.objectify.impl.translate.opt.joda.ReadableInstantTranslatorFactory
-
- All Implemented Interfaces:
TranslatorFactory<org.joda.time.ReadableInstant,com.google.cloud.Timestamp>
public class ReadableInstantTranslatorFactory extends ValueTranslatorFactory<org.joda.time.ReadableInstant,com.google.cloud.Timestamp>
Converts Joda ReadableInstants (DateTime, DateMidnight, etc) into TimestampAll custom translators must be registered *before* entity classes are registered.
- Author:
- Jeff Schnitzer
-
-
Constructor Summary
Constructors Constructor Description ReadableInstantTranslatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValueTranslator<org.joda.time.ReadableInstant,com.google.cloud.Timestamp>
createValueTranslator(TypeKey<org.joda.time.ReadableInstant> tk, CreateContext ctx, Path path)
Create a translator, knowing that we have the appropriate type.-
Methods inherited from class com.googlecode.objectify.impl.translate.ValueTranslatorFactory
create
-
-
-
-
Method Detail
-
createValueTranslator
protected ValueTranslator<org.joda.time.ReadableInstant,com.google.cloud.Timestamp> createValueTranslator(TypeKey<org.joda.time.ReadableInstant> tk, CreateContext ctx, Path path)
Description copied from class:ValueTranslatorFactory
Create a translator, knowing that we have the appropriate type. You don't need to check for type matching.- Specified by:
createValueTranslator
in classValueTranslatorFactory<org.joda.time.ReadableInstant,com.google.cloud.Timestamp>
- Parameters:
tk
- type is guaranteed to erase to something assignable to Class
-
-