01: package com.titan.cruise;
02:
03: import javax.ejb.CreateException;
04: import javax.ejb.RemoveException;
05: import javax.ejb.EntityContext;
06: import com.titan.ship.*;
07: import java.util.Collection;
08: import javax.naming.InitialContext;
09: import javax.naming.NamingException;
10:
11: public abstract class CruiseBean implements javax.ejb.EntityBean {
12:
13: public Integer ejbCreate(String name, ShipLocal ship)
14: throws CreateException {
15: setName(name);
16: return null;
17: }
18:
19: public void ejbPostCreate(String name, ShipLocal ship) {
20: setShip(ship);
21: }
22:
23: // persistent fields
24: public abstract void setName(String name);
25:
26: public abstract String getName();
27:
28: public abstract void setShip(ShipLocal ship);
29:
30: public abstract ShipLocal getShip();
31:
32: // relationship fields
33:
34: public abstract void setReservations(Collection res);
35:
36: public abstract Collection getReservations();
37:
38: // standard call back methods
39:
40: public void setEntityContext(EntityContext ec) {
41: }
42:
43: public void unsetEntityContext() {
44: }
45:
46: public void ejbLoad() {
47: }
48:
49: public void ejbStore() {
50: }
51:
52: public void ejbActivate() {
53: }
54:
55: public void ejbPassivate() {
56: }
57:
58: public void ejbRemove() throws RemoveException {
59: }
60:
61: }
|