All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.objectify.KeyRange Maven / Gradle / Ivy

Go to download

*** THIS VERSION UPLOADED FOR USE WITH CEDAR-COMMON, TO AVOID DEPENDENCIES ON GOOGLE CODE-BASED MAVEN REPOSITORIES. *** The simplest convenient interface to the Google App Engine datastore

The newest version!
package com.googlecode.objectify;

import java.io.Serializable;
import java.util.Iterator;

import com.googlecode.objectify.util.TranslatingIterator;

/**
 * 

This is a typesafe version of the KeyRange object. It represents a number * of ids preallocated with {@code ObjectifyFactory#allocateIds(Class, long)}.

* * @author Jeff Schnitzer */ public class KeyRange implements Iterable>, Serializable { private static final long serialVersionUID = 1L; /** */ com.google.appengine.api.datastore.KeyRange raw; /** */ KeyRange(com.google.appengine.api.datastore.KeyRange raw) { this.raw = raw; } /** * Get the raw datastore keyrange. */ public com.google.appengine.api.datastore.KeyRange getRaw() { return this.raw; } /* (non-Javadoc) * @see java.lang.Iterable#iterator() */ @Override public Iterator> iterator() { return new TranslatingIterator>(this.raw.iterator()) { @Override protected Key translate(com.google.appengine.api.datastore.Key from) { return new Key(from); } }; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy