com.googlecode.objectify.impl
Class SessionCachingQueryImpl<T>

java.lang.Object
  extended by com.googlecode.objectify.impl.QueryImpl<T>
      extended by com.googlecode.objectify.impl.SessionCachingQueryImpl<T>
All Implemented Interfaces:
com.google.appengine.api.datastore.QueryResultIterable<T>, Query<T>, java.lang.Cloneable, java.lang.Iterable<T>

public class SessionCachingQueryImpl<T>
extends QueryImpl<T>

Extends the QueryImpl to add a session cache. Note that it only needs to override the iterator() method.

Author:
Jeff Schnitzer

Nested Class Summary
protected  class SessionCachingQueryImpl.SessionCachingQueryResultIterator
          Simple iterator passes through and merges with the cache.
 
Nested classes/interfaces inherited from class com.googlecode.objectify.impl.QueryImpl
QueryImpl.ToKeyIterable, QueryImpl.ToKeyIterator, QueryImpl.ToObjectIterable, QueryImpl.ToObjectIterator
 
Field Summary
protected  java.util.Map<Key<?>,java.lang.Object> cache
          The cache is a simple hashmap, obtained from the SessionCachingObjectifyImpl
 
Constructor Summary
SessionCachingQueryImpl(ObjectifyFactory fact, Objectify ofy, java.util.Map<Key<?>,java.lang.Object> cache)
           
SessionCachingQueryImpl(ObjectifyFactory fact, Objectify ofy, java.util.Map<Key<?>,java.lang.Object> cache, java.lang.Class<T> clazz)
           
 
Method Summary
 com.google.appengine.api.datastore.QueryResultIterator<T> iterator()
           
 
Methods inherited from class com.googlecode.objectify.impl.QueryImpl
ancestor, chunkSize, clone, cloneRawQuery, count, endCursor, fetch, fetchKeys, fetchParentKeys, fetchParents, filter, get, getActual, getKey, limit, list, listKeys, offset, order, prefetchSize, startCursor, toString, translate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cache

protected final java.util.Map<Key<?>,java.lang.Object> cache
The cache is a simple hashmap, obtained from the SessionCachingObjectifyImpl

Constructor Detail

SessionCachingQueryImpl

public SessionCachingQueryImpl(ObjectifyFactory fact,
                               Objectify ofy,
                               java.util.Map<Key<?>,java.lang.Object> cache)

SessionCachingQueryImpl

public SessionCachingQueryImpl(ObjectifyFactory fact,
                               Objectify ofy,
                               java.util.Map<Key<?>,java.lang.Object> cache,
                               java.lang.Class<T> clazz)
Method Detail

iterator

public com.google.appengine.api.datastore.QueryResultIterator<T> iterator()
Specified by:
iterator in interface com.google.appengine.api.datastore.QueryResultIterable<T>
Specified by:
iterator in interface java.lang.Iterable<T>
Overrides:
iterator in class QueryImpl<T>


Copyright © 2011 Jeff Schnitzer and a gang of pirates. All Rights Reserved. Build version: 3.1