Methods Summary |
---|
public void | ejbActivate()
|
public java.lang.Object | ejbCreate(com.titan.cruise.CruiseLocal cruise, java.util.Collection customers)
System.out.println ("ReservationBean::ejbCreate");
setId(new Integer(idgen++));
return null;
|
public java.lang.Integer | ejbCreate(com.titan.customer.CustomerRemote customer, com.titan.cruise.CruiseLocal cruise, com.titan.cabin.CabinLocal cabin, double price, java.util.Date dateBooked)
System.out.println ("ReservationBean::ejbCreate");
setId(new Integer(idgen++));
setAmountPaid (price);
setDate (dateBooked);
return null;
|
public void | ejbLoad()
|
public void | ejbPassivate()
|
public void | ejbPostCreate(com.titan.cruise.CruiseLocal cruise, java.util.Collection customers)
System.out.println ("ReservationBean::ejbPostCreate");
setCruise (cruise);
Collection myCustomers = this.getCustomers ();
myCustomers.addAll (customers);
|
public void | ejbPostCreate(com.titan.customer.CustomerRemote customer, com.titan.cruise.CruiseLocal cruise, com.titan.cabin.CabinLocal cabin, double price, java.util.Date dateBooked)
System.out.println ("ReservationBean::ejbPostCreate");
setCruise (cruise);
// Our bean has many cabins, use the cmr set method here..
Set cabins = new HashSet ();
cabins.add (cabin);
this.setCabins (cabins);
try
{
Integer primKey = (Integer)customer.getPrimaryKey ();
javax.naming.Context jndiContext = new InitialContext ();
CustomerHomeLocal home = (CustomerHomeLocal)
jndiContext.lookup ("java:comp/env/ejb/CustomerHomeLocal"); // get local interface
CustomerLocal custL = home.findByPrimaryKey (primKey);
// Our bean has many customers, use the cmr set method here..
Set customers = new HashSet ();
customers.add (custL);
this.setCustomers (customers);
}
catch (RemoteException re)
{
throw new CreateException ("Invalid Customer - Bad Remote Reference");
}
catch (FinderException fe)
{
throw new CreateException ("Invalid Customer - Unable to Find Local Reference");
}
catch (NamingException ne)
{
throw new CreateException ("Invalid Customer - Unable to find CustomerHomeLocal Reference");
}
|
public void | ejbRemove()
|
public void | ejbStore()
|
public abstract double | getAmountPaid()
|
public abstract java.util.Set | getCabins()
|
public abstract com.titan.cruise.CruiseLocal | getCruise()
|
public abstract java.util.Set | getCustomers()
|
public abstract java.util.Date | getDate()
|
public abstract java.lang.Integer | getId()
|
public abstract void | setAmountPaid(double amount)
|
public abstract void | setCabins(java.util.Set cabins)
|
public abstract void | setCruise(com.titan.cruise.CruiseLocal cruise)
|
public abstract void | setCustomers(java.util.Set customers)
|
public abstract void | setDate(java.util.Date date)
|
public void | setEntityContext(javax.ejb.EntityContext ec)
|
public abstract void | setId(java.lang.Integer id)
|
public void | unsetEntityContext()
|