com.googlecode.objectify.impl.translate.ArrayTranslatorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of objectify Show documentation
Show all versions of objectify Show documentation
The simplest convenient interface to the Google App Engine datastore
package com.googlecode.objectify.impl.translate;
import com.googlecode.objectify.impl.Path;
import com.googlecode.objectify.repackaged.gentyref.GenericTypeReflector;
import java.lang.reflect.Array;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* 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.
*
* @see CollectionTranslatorFactory
*
* @author Jeff Schnitzer
*/
public class ArrayTranslatorFactory implements TranslatorFactory
© 2015 - 2024 Weber Informatics LLC | Privacy Policy