FileDocCategorySizeDatePackage
ReservationBean.javaAPI DocExample1793Mon Nov 01 06:59:06 GMT 1999com.titan.reservation

ReservationBean.java

package com.titan.reservation;

import com.titan.cabin.*;
import com.titan.cruise.*;
import com.titan.customer.*;

import javax.ejb.*;
import java.rmi.*;
import javax.naming.*;
import java.util.Properties;


public class ReservationBean implements javax.ejb.EntityBean {
    
    public int customerID;
    public int cruiseID;
    public int cabinID;
    public double price;
    
   
    public javax.ejb.EntityContext ejbContext;

    public void ejbCreate(Customer customer, Cruise cruise, Cabin cabin, double price)
    throws RemoteException{
        // This method throws a remote exception if one of the getPrimaryKey() invocations throws a RemoteException
        this.customerID = ((CustomerPK)customer.getPrimaryKey()).id;
        this.cruiseID = ((CruisePK)cruise.getPrimaryKey()).id;
        this.cabinID = ((CabinPK)cabin.getPrimaryKey()).id;
        this.price = price;
    }

    public void ejbPostCreate(Customer customer, Cruise cruise, Cabin cabin, double price){
        // do nothing;
    }
    public double getPrice( ){
        return price;
    }
    public int getCabinID( ){
        return cabinID;
    }
    public int getCustomerID( ){
        return customerID;
    }
    public int getCruiseID( ){
        return cruiseID;
    }
	public void setEntityContext(javax.ejb.EntityContext ctx){
	     //not implemented
    }
    public void unsetEntityContext(){
	     //not implemented
    }
    public void ejbActivate(){
        // not implmented
    }
    public void ejbPassivate(){
        // not implmented
    }
    public void ejbLoad(){
        // not implmented
    }
    public void ejbStore(){
        // not implmented
    }
    public void ejbRemove(){
        // not implmented
    }
}