1 37 38 package com.sun.j2ee.blueprints.airlinesupplier.purchaseorder.ejb; 39 40 import javax.ejb.*; 41 import java.util.*; 42 43 import com.sun.j2ee.blueprints.airlinesupplier.powebservice.*; 44 45 48 public abstract class AirlineOrderBean implements EntityBean { 49 50 private EntityContext entityContext = null; 51 52 public String ejbCreate(AirlineOrder flightObj) throws CreateException { 53 54 setOrderId(flightObj.getOrderId()); 55 setDepFlightId(flightObj.getDepFlightId()); 56 setDepFlightDate(flightObj.getDepFlightDate().getTimeInMillis()); 57 setRetFlightId(flightObj.getRetFlightId()); 58 setRetFlightDate(flightObj.getRetFlightDate().getTimeInMillis()); 59 setHeadCount(flightObj.getHeadCount()); 60 return null; 61 } 62 63 public void ejbPostCreate(AirlineOrder po) throws CreateException {} 64 65 public abstract void setOrderId(String orderId); 67 public abstract void setDepFlightId(String flightId); 68 public abstract void setDepFlightDate(long date); 69 public abstract void setRetFlightId(String flightId); 70 public abstract void setRetFlightDate(long date); 71 public abstract void setHeadCount(int count); 72 73 public abstract String getOrderId(); 74 public abstract String getDepFlightId(); 75 public abstract long getDepFlightDate(); 76 public abstract String getRetFlightId(); 77 public abstract long getRetFlightDate(); 78 public abstract int getHeadCount(); 79 80 public void ejbRemove() throws RemoveException {} 81 82 public void ejbLoad() {} 83 84 public void ejbStore() {} 85 86 public void ejbActivate() {} 87 88 public void ejbPassivate() {} 89 90 public void unsetEntityContext() { 91 this.entityContext = null; 92 } 93 94 public void setEntityContext(EntityContext entityContext) { 95 this.entityContext = entityContext; 96 } 97 } 98 | Popular Tags |