Sample for a home interface
package training.proman.ejb;
import java.util.Collection;
import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.ejb.EJBLocalHome;
import javax.ejb.FinderException;
/**
* @author earnest.thomas
*
* This is the Local Home of Product entity bean, Product
* entity bean is used to reprecent the product in the database.
*/
public interface ProductLocalHome extends EJBLocalHome {
/**
* Creation method.
* @param name
* @param retailPrice
* @param wholeSalePrice
* @param discountPrice
* @param description
* @param quantity
* @return
* @throws CreateException
* @throws EJBException
*/
public ProductLocal create(
String name,
float retailPrice,
float wholeSalePrice,
float discountPrice,
String description,
int quantity)
throws CreateException, EJBException;
/**
* Find Local Object by id
* @param id
* @return a Local Object
* @throws FinderException
* @throws EJBException
*/
public ProductLocal findByPrimaryKey(Integer id)
throws FinderException, EJBException;
/**
* Find all Local Objects
* @return Collection of all Local Object
* @throws FinderException
* @throws EJBException
*/
public Collection findAll() throws FinderException, EJBException;
}