/**
 * ITitleSearchStrategy.java
 * Created May 14, 2008
 * Copyright (c) TANDBERG Television 2007-2008
 */
package com.tandbergtv.watchpoint.pmm.title.provider;

import java.util.Collection;

import com.tandbergtv.watchpoint.pmm.entities.Title;
import com.tandbergtv.workflow.util.SearchCriteria;

/**
 * Search provider interface
 * 
 * @author Sahil Verma
 */
public interface ITitleSearchStrategy {
	
	/**
	 * Get the Title Provider that uses this search strategy
	 * 
	 * @return The Title Provider
	 */
	ITitleProvider getTitleProvider();

	/**
	 * Set the Title Provider that uses this search strategy
	 * 
	 * @param provider The Title Provider
	 */
	void setTitleProvider(ITitleProvider provider);
	
	/**
	 * Perform the search
	 * 
	 * @param criteria
	 * @return
	 */
	Collection<Title> search(SearchCriteria criteria);
	
	/**
	 * Returns the number of matches for the specified criteria
	 * 
	 * @param criteria
	 * @return
	 */
	int count(SearchCriteria criteria);
}
