package ejava.examples.checkouts.ejb;

import java.util.Date;
import java.util.Set;

/**
   This interface represents the business methods available to the local
   component interface of the Borrower EJB.
*/
public interface BorrowerLBI {
   String getId();
   String getName();
   String getPhoneNumber();
   String getAddress();
   Date getBeginDate();
   Date getEndDate();
   Set getCheckouts();
   
   /**
      Assigns a new checkout to the borrower.

      @param checkout 	the new checkout with all items assigned
      @exception CheckoutException if the borrower is invalid or cannot
         accept the specified checkout.
   */
   void addCheckout(CheckoutLocal checkout) throws CheckoutException;

   /**
      Determines if the borrower is able to accept checkouts.

      @return boolean 	true if the borrower is still able to accept
         checkouts in general.
   */
   boolean isValid();

   /**
      End the borrower's ability to do checkouts.
   */
   void terminate();
}

