package thegroup.projectcddb.database;

import javax.ejb.EJBHome;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.FinderException;


/**
 *  Interface for the methods of how to search for a file
 *
 *@author    Diana Abbas <dabbas @ umail ucsb edu >
 *@author    Kyle Dorman <kyle_dorman @ umail ucsb edu>
 */
public interface CDEntryHome extends EJBHome
{
	/**
	 *  Creates a new object 
	 *
	 *@param  id                   
	 *@param  title                
	 *@param  year                 
	 *@param  genre                
	 *@param  extendedData                           
	 *@exception  RemoteException  Provides backward compatibility for enterprise beans
	 *@exception  CreateException  Failure to create an entity EJB object
	
	 */
	public CDEntryRemote create( String id, String title, String year, String genre, String extendedData )
			 throws CreateException, RemoteException;


	/**
	 *  Finds the file in the database according to primary key
	 *
	 *@param  pk                   Primary Key               
	 *@exception  RemoteException  Provides backward compatibility for enterprise beans
	 *@exception  FinderException  Failure to create an entity EJB object

	 */
	public CDEntryRemote findByPrimaryKey( Integer pk )
			 throws FinderException, RemoteException;


	/**
	 *  Finds the file in the database according to Disc ID
	 *
	 *@param  cdid                 CD Disc ID                    
	 *@exception  RemoteException  Provides backward compatibility for enterprise beans
	 *@exception  FinderException  Failure to create an entity EJB object

	 */
	public java.util.Collection findByCDID( String cdid )
			 throws FinderException, RemoteException;
}
