Class ArrayTranslatorFactory

java.lang.Object
com.googlecode.objectify.impl.translate.ArrayTranslatorFactory
All Implemented Interfaces:
TranslatorFactory<Object,​Collection<Object>>

public class ArrayTranslatorFactory
extends Object
implements TranslatorFactory<Object,​Collection<Object>>

Translator which can load an array of things.

Note that empty or null arrays are not stored in the datastore, and null values for the array field are ignored when they are loaded from the Entity. This is because the datastore doesn't store empty collections, and storing null fields will confuse filtering for actual nulls in the array contents.

The reason the generic P type of this factory is Object instead of Object[] is that Object[] is incompatible with the primitive arrays. This factory handles primitives as well.

Author:
Jeff Schnitzer
See Also:
CollectionTranslatorFactory