package thegroup.projectcddb.database;

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

/**
 *  Interface for the track bean
 *
 *@author    Diana Abbas <dabbas @ umail ucsb edu >
 *@author    Kyle Dorman <kyle_dorman @ umail ucsb edu>
 */
public interface TrackHome extends EJBHome
{
	/**
	 *  Creates a bean with the information given to it
	 *
	 *@param  discid               
	 *@param  title                
	 *@param  trackNumber          
	 *@param  extendedData         
	 *@exception  RemoteException  Provides backward compatibility for enterprise beans
	 *@exception  CreateException  Failure to create an entity EJB object
	 *
	 */
	public TrackRemote create( String discid, String title, Integer trackNumber, String extendedData )
			 throws CreateException, RemoteException;


	/**
	 *  Finds the file in the database according to primary key
	 *
	 *@param  pk                   Primary Key ID number
	 *@exception  RemoteException  Provides backward compatibility for enterprise beans
	 *@exception  FinderException  Reports a failure to find the requested EJB object
	 *
	 */
	public TrackRemote 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  Reports a failure to find the requested EJB object
	 *
	 */
	public java.util.Collection findByCDID( String cdid )
			 throws FinderException, RemoteException;

}
