Class MoneyStringTranslatorFactory
- java.lang.Object
-
- com.googlecode.objectify.impl.translate.ValueTranslatorFactory<org.joda.money.Money,String>
-
- com.googlecode.objectify.impl.translate.opt.joda.MoneyStringTranslatorFactory
-
- All Implemented Interfaces:
TranslatorFactory<org.joda.money.Money,String>
public class MoneyStringTranslatorFactory extends ValueTranslatorFactory<org.joda.money.Money,String>
Stores Money as its string representation. Note that this does not index properly; you can't safely use inequality filters. However, indexing is not always necessary and this is a very useful thing to be able to store.All custom translators must be registered *before* entity classes are registered.
- Author:
- Jeff Schnitzer
-
-
Constructor Summary
Constructors Constructor Description MoneyStringTranslatorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ValueTranslator<org.joda.money.Money,String>
createValueTranslator(TypeKey<org.joda.money.Money> 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.money.Money,String> createValueTranslator(TypeKey<org.joda.money.Money> 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.money.Money,String>
- Parameters:
tk
- type is guaranteed to erase to something assignable to Class
-
-