package com.bq.oss.lib.queries.mongo.repository;

import java.io.Serializable;
import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.bq.oss.lib.queries.request.AggregationResult;
import com.bq.oss.lib.queries.request.Pagination;
import com.bq.oss.lib.queries.request.ResourceQuery;
import com.bq.oss.lib.queries.request.Sort;

/**
 * @author Rubén Carrasco
 * 
 */
public interface GenericFindRepository<E, ID extends Serializable> extends MongoRepository<E, ID> {

	/**
	 * Returns a List of E Objects that match the assertions contained in the specified ResourdceQuery. The result can
	 * be paginated or/and sorted.
	 * 
	 * @param resourceQuery
	 *            Object with the assertions for finding
	 * @param pagination
	 *            Object to paginate the result of the search
	 * @param sort
	 *            Object to sort the result
	 * @return List of E Objects
	 */
	List<E> find(ResourceQuery resourceQuery, Pagination pagination, Sort sort);

	/**
	 * Returns a List of E Objects that match the disjunction of the assertions contained in ResourdceQueries. The
	 * result can be paginated or/and sorted.
	 * 
	 * @param resourceQuery
	 *            Object with the assertions for finding
	 * @param pagination
	 *            Object to paginate the result of the search
	 * @param sort
	 *            Object to sort the result
	 * @return List of E Objects
	 */
	List<E> find(List<ResourceQuery> resourceQueries, Pagination pagination, Sort sort);

	/**
	 * Returns the number of E Objects that match the assertions contained in the specified ResourdceQuery.
	 * 
	 * @param resourceQuery
	 *            Object with the assertions for finding
	 * @return the number of E Objects that match the query
	 */
	AggregationResult count(ResourceQuery resourceQuery);

}

@@ -402,18 +402,17 @@
 rasco%0A *
- 
 %0A
+
  */%0Apubl
@@ -656,33 +656,32 @@
 /and sorted.%0A%09 *
- 
 %0A%09 * @param reso
@@ -1155,25 +1155,24 @@
  sorted.%0A%09 *
- 
 %0A%09 * @param 
@@ -1175,33 +1175,35 @@
 ram resourceQuer
-y
+ies
 %0A%09 *            
@@ -1611,20 +1611,19 @@
 eQuery.%0A
+
 %09 *
- 
 %0A%09 * @pa

fix javadoc