@Override
	public <S> Map<S, T> ids(final Iterable<S> ids) {

		final Map<Key<T>, S> keymap = new LinkedHashMap<>();
		for (final S id: ids)
			keymap.put(this.makeKey(id), id);

		final Map<Key<T>, T> loaded = loader.keys(keymap.keySet());

		return ResultProxy.create(Map.class, new ResultCache<Map<S, T>>() {
			@Override
			protected Map<S, T> nowUncached() {
				final Map<S, T> proper = new LinkedHashMap<>(loaded.size() * 2);

				for (final Map.Entry<Key<T>, T> entry: loaded.entrySet())
					proper.put(keymap.get(entry.getKey()), entry.getValue());

				return proper;
			}
		});
	}

	/**
	 * Make a key for the given id, which could be either string or long
	 */
	private <T> Key<T> makeKey(final Object id) {
		final com.google.cloud.datastore.Key key = factory().keys().createRawAny(Keys.raw(this.parent), kind, id);
		return Key.create(key);
	}

	/* (non-Javadoc)
	 * @see com.googlecode.objectify.cmd.LoadType#parent(java.lang.Object)
	 */
	@Override
	public LoadIds<T> parent(final Object keyOrEntity) {
		final Key<T> parentKey = factory().keys().anythingToKey(keyOrEntity);
		return new LoadTypeImpl<>(loader, kind, type, parentKey);
	}

	/** */
	private ObjectifyFactory factory() {
		return loader.getObjectifyImpl().factory();
	}
}
@ Override public < S > Map < S , T > ids ( final Iterable < S > ids ) { final Map < Key < T > , S > keymap = new LinkedHashMap < > ( ) ; for ( final S id : ids ) keymap . put ( this . makeKey ( id ) , id ) ; final Map < Key < T > , T > loaded = loader . keys ( keymap . keySet ( ) ) ; return ResultProxy . create ( Map . class , new ResultCache < Map < S , T > > ( ) { @ Override protected Map < S , T > nowUncached ( ) { final Map < S , T > proper = new LinkedHashMap < > ( loaded . size ( ) * 2 ) ; for ( final Map . Entry < Key < T > , T > entry : loaded . entrySet ( ) ) proper . put ( keymap . get ( entry . getKey ( ) ) , entry . getValue ( ) ) ; return proper ; } } ) ; } private < T > Key < T > makeKey ( final Object id ) { final com . google . cloud . datastore . Key key = factory ( ) . keys ( ) . createRawAny ( Keys . raw ( this . parent ) , kind , id ) ; return Key . create ( key ) ; } @ Override public LoadIds < T > parent ( final Object keyOrEntity ) { final Key < T > parentKey = factory ( ) . keys ( ) . anythingToKey ( keyOrEntity ) ; return new LoadTypeImpl < > ( loader , kind , type , parentKey ) ; } private ObjectifyFactory factory ( ) { return loader . getObjectifyImpl ( ) . factory ( ) ; } }
/* (non-Javadoc)
@see com.googlecode.objectify.cmd.LoadIds#ids(java.lang.Iterable)