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

se.l4.silo.search.query.OrQuery Maven / Gradle / Ivy

There is a newer version: 0.2.3
Show newest version
package se.l4.silo.search.query;

import java.util.List;

import com.google.common.collect.Lists;

import se.l4.silo.search.QueryItem;
import se.l4.silo.search.QueryPart;
import se.l4.silo.search.QueryWithSubqueries;

public class OrQuery
	extends AbstractQueryPart
	implements QueryWithSubqueries, ReturnPath>
{
	private final List items;

	public OrQuery()
	{
		items = Lists.newArrayList();
	}

	@Override
	public void addQuery(QueryItem item)
	{
		items.add(item);
	}

	@Override
	public 

>> P query(P q) { q.parent(this, this); return q; } @Override public ReturnPath done() { receiver.addQuery(new QueryItem("or", items)); return parent; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy