orderservice.java

来自「用JAVA编写的EJB」· Java 代码 · 共 49 行

JAVA
49
字号
package oracle.toplink.jpa.example.inventory.services;

import java.util.Collection;

import oracle.toplink.jpa.example.inventory.model.Item;
import oracle.toplink.jpa.example.inventory.model.Order;

/**
 * This class provides the interface point for the 'OrderService'.  The
 * implemenation of the OrderService access the persistence store and
 * provides the caller with data about the Orders in the system.  
 * This interface also provides maintenance operation on the Order data.
 *
 * @author Gordon Yorke
 */
 public interface OrderService {
    /**
     * Returns those orders that have a set arrival date indicating that they have shipped
     */
    public Collection<Order> getShippedOrdersForItem(long itemId);
    
    /**
     * Returns those orders that have a set arrival date indicating that they have shipped
     */
    public Collection<Order> getPendingOrdersForItem(long itemId);
    
    /**
     * request that an order be canceled.  Assume the operation completed
     * successfully unless an exception is thrown. 
     */
    public void requestCancelOrder(long orderId);
    
    /**
     * request that an order quantity be updated.  Assume the operation completed
     * successfully unless an exception is thrown.
     */
    public void alterOrderQuantity(long orderId, int newQuantity);
    
    /**
     * Create a new order request for a particular item;  This will create an 
     * Order in the order system.  Assume success unless an exception is thrown
     */
    public void  createNewOrder(Order order);
    
    public Order getOrderById(long orderId);
    
    public Item getItemById(long itemId);
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?