/*
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations under the
 * License.
 *-----------------------------------------------------------------------------
 * $Id$
 *-----------------------------------------------------------------------------
 */
package org.objectweb.jonas.jtests.beans.relatives;

import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
import javax.ejb.FinderException;
import java.util.Collection;
import java.util.Date;

/**
 * Created on Sep 25, 2002
 * @author  Christophe Ney - cney@batisseurs.com
 */
public interface RelativeLocalHome extends EJBLocalHome {

	/**
	 * create a new RelativeLocal.
	 * The fullName must be unique since it is used as primaryKey.
	 */
	RelativeLocal create(String fullName, Date birthdate, int luckyNumber)
		throws CreateException;


	/**
	 * find a relative using it's full name.
	 */
	RelativeLocal findByPrimaryKey(String fullName) throws FinderException;


	/**
	 * find the collection of relatives using the query in the deployment
	 * descriptor.
	 */
	Collection findFromGivenQuery(String fullName, Date birthdate,
								  int luckyNumber) throws FinderException;

}
