01: package com.titan.cabin;
02:
03: import java.util.Set;
04:
05: import javax.ejb.EntityContext;
06: import javax.ejb.FinderException;
07:
08: import com.titan.customer.CustomerLocal;
09: import com.titan.ship.ShipLocal;
10:
11: public abstract class CabinBean implements javax.ejb.EntityBean {
12:
13: public Integer ejbCreate(Integer id)
14: throws javax.ejb.CreateException {
15: this .setId(id);
16: return null;
17: }
18:
19: public void ejbPostCreate(Integer id) {
20:
21: }
22:
23: public abstract Set ejbSelectAllForCustomer(CustomerLocal cust)
24: throws FinderException;
25:
26: // Public Home method required to test the private ejbSelectAllForCustomer
27: // method
28: public Set ejbHomeSelectAllForCustomer(CustomerLocal cust)
29: throws FinderException {
30: return this .ejbSelectAllForCustomer(cust);
31: }
32:
33: public abstract void setId(Integer id);
34:
35: public abstract Integer getId();
36:
37: public abstract void setShip(ShipLocal ship);
38:
39: public abstract ShipLocal getShip();
40:
41: public abstract void setName(String name);
42:
43: public abstract String getName();
44:
45: public abstract void setBedCount(int count);
46:
47: public abstract int getBedCount();
48:
49: public abstract void setDeckLevel(int level);
50:
51: public abstract int getDeckLevel();
52:
53: public int getShipId() {
54: return getShip().getId().intValue();
55: }
56:
57: public void setShipId(int sp) {
58: ShipLocal sl = getShip();
59: sl.setId(new Integer(sp));
60: setShip(sl);
61: }
62:
63: public void setEntityContext(EntityContext ctx) {
64: // Not implemented.
65: }
66:
67: public void unsetEntityContext() {
68: // Not implemented.
69: }
70:
71: public void ejbActivate() {
72: // Not implemented.
73: }
74:
75: public void ejbPassivate() {
76: // Not implemented.
77: }
78:
79: public void ejbLoad() {
80: // Not implemented.
81: }
82:
83: public void ejbStore() {
84: // Not implemented.
85: }
86:
87: public void ejbRemove() throws javax.ejb.RemoveException {
88: // Not implemented.
89: }
90: }
|