📄 bookhome.java
字号:
package examples;
import javax.ejb.*;
import java.util.Collection;
/**
* This is the local home interface for Book.
* This interface is implemented by the EJB container.
* The implemented object is called the local home object,
* and serves as a factory for EJB local objects.
*
* One create() method is in this Home Interface, which
* corresponds to the ejbCreate() method in the bean class.
*/
public interface BookHome extends EJBLocalHome {
/*
* Creates a Book
*
* @param BookID The number of the Book (unique)
* @param name The name of the Book
* @param description Book description
* @param basePrice Base Price of Book
*
* @return The newly created EJB Object.
*/
Book create(String bookID, String name, String description, double basePrice) throws CreateException;
// Finder methods. These are implemented by the
// container. You can customize the functionality of
// these methods in the deployment descriptor through
// EJB-QL and container tools.
/**
* Returns the Book EJB object for the given Book id
*/
public Book findByPrimaryKey(String key) throws FinderException;
/**
* Returns set of the Book EJB objects for the given Book name
*/
public Collection findByName(String name) throws FinderException;
/**
* Returns set of the Book EJB objects for the given Book description
*/
public Collection findByDescription(String description) throws FinderException;
/**
* Returns set of the Book EJB objects for the given Book base price
*/
public Collection findByBasePrice(double basePrice) throws FinderException;
/**
* Returns set of the Book EJB objects whose base price is greater than minprice
*/
public Collection findExpensiveBooks(double minPrice) throws FinderException;
/**
* Returns set of the Book EJB objects whose base price is less than maxPrice
*/
public Collection findCheapBooks(double maxPrice) throws FinderException;
/**
* Returns set of all the Book EJB objects
*/
public Collection findAllBooks() throws FinderException;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -