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

com.googlecode.objectify.util.QueryWrapper 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.util;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.google.appengine.api.datastore.Cursor;
import com.google.appengine.api.datastore.QueryResultIterable;
import com.google.appengine.api.datastore.QueryResultIterator;
import com.googlecode.objectify.Key;
import com.googlecode.objectify.Query;

/**
 * Simple wrapper/decorator for a Query.
 *
 * @author Jeff Schnitzer 
 */
public class QueryWrapper implements Query
{
	/** */
	Query base;
	
	/** */
	public QueryWrapper(Query base) 
	{
		this.base = base;
	}
	
	@Override
	public Query filter(String condition, Object value)
	{
		return this.base.filter(condition, value);
	}
	
	@Override
	public Query order(String condition)
	{
		return this.base.order(condition);
	}
	
	@Override
	public Query ancestor(Object keyOrEntity)
	{
		return this.base.ancestor(keyOrEntity);
	}
	
	@Override
	public Query limit(int value)
	{
		return this.base.limit(value);
	}
	
	@Override
	public Query offset(int value)
	{
		return this.base.offset(value);
	}

	@Override
	public Query startCursor(Cursor value)
	{
		return this.base.startCursor(value);
	}

	@Override
	public Query endCursor(Cursor value)
	{
		return this.base.endCursor(value);
	}

	@Override
	public String toString()
	{
		return this.base.toString();
	}

	@Override
	public QueryResultIterator iterator()
	{
		return this.base.iterator();
	}

	@Override
	public T get()
	{
		return this.base.get();
	}

	@Override
	public Key getKey()
	{
		return this.base.getKey();
	}

	@Override
	public int count()
	{
		return this.base.count();
	}

	@Override
	public QueryResultIterable fetch()
	{
		return this.base.fetch();
	}

	@Override
	public QueryResultIterable> fetchKeys()
	{
		return this.base.fetchKeys();
	}

	@Override
	public  Set> fetchParentKeys()
	{
		return this.base.fetchParentKeys();
	}

	@Override
	public  Map, V> fetchParents()
	{
		return this.base.fetchParents();
	}

	@Override
	public List list()
	{
		return this.base.list();
	}

	@Override
	public List> listKeys()
	{
		return this.base.listKeys();
	}
	
	@Override
	public Query clone()
	{
		return new QueryWrapper(this.base.clone());
	}

	@Override
	public Query chunkSize(int value)
	{
		return this.base.chunkSize(value);
	}

	@Override
	public Query prefetchSize(int value)
	{
		return this.base.prefetchSize(value);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy