1 37 package com.sun.j2ee.blueprints.lodgingsupplier.purchaseorder.ejb; 38 39 import javax.ejb.*; 40 import java.util.*; 41 42 import com.sun.j2ee.blueprints.lodgingsupplier.powebservice.*; 43 44 47 public abstract class LodgingOrderBean implements EntityBean { 48 49 private EntityContext entityContext = null; 50 51 public String ejbCreate(LodgingOrder lodgeObj) throws CreateException { 52 53 setOrderId(lodgeObj.getOrderId()); 54 setLodgingId(lodgeObj.getLodgingId()); 55 setStartDate(lodgeObj.getStartDate().getTimeInMillis()); 56 setEndDate(lodgeObj.getEndDate().getTimeInMillis()); 57 setHeadCount(lodgeObj.getHeadCount()); 58 return null; 59 } 60 61 public void ejbPostCreate(LodgingOrder po) throws CreateException {} 62 63 public abstract void setOrderId(String orderId); 65 public abstract void setLodgingId(String poId); 66 public abstract void setStartDate(long date); 67 public abstract void setEndDate(long date); 68 public abstract void setHeadCount(int count); 69 70 public abstract String getOrderId(); 71 public abstract String getLodgingId(); 72 public abstract long getStartDate(); 73 public abstract long getEndDate(); 74 public abstract int getHeadCount(); 75 76 public void ejbRemove() throws RemoveException {} 77 78 public void ejbLoad() {} 79 80 public void ejbStore() {} 81 82 public void ejbActivate() {} 83 84 public void ejbPassivate() {} 85 86 public void unsetEntityContext() { 87 this.entityContext = null; 88 } 89 90 public void setEntityContext(EntityContext entityContext) { 91 this.entityContext = entityContext; 92 } 93 } 94 | Popular Tags |