01: package com.titan.ship;
02:
03: import javax.ejb.EntityContext;
04: import javax.ejb.CreateException;
05: import javax.ejb.RemoveException;
06:
07: public abstract class ShipBean implements javax.ejb.EntityBean {
08:
09: public Integer ejbCreate(Integer primaryKey, String name,
10: double tonnage) throws CreateException {
11: setId(primaryKey);
12: setName(name);
13: setTonnage(tonnage);
14: return null;
15: }
16:
17: public void ejbPostCreate(Integer primaryKey, String name,
18: double tonnage) {
19: }
20:
21: // persistent fields
22:
23: public abstract void setId(Integer id);
24:
25: public abstract Integer getId();
26:
27: public abstract void setName(String name);
28:
29: public abstract String getName();
30:
31: public abstract void setTonnage(double tonnage);
32:
33: public abstract double getTonnage();
34:
35: // standard call back methods
36:
37: public void setEntityContext(EntityContext ec) {
38: }
39:
40: public void unsetEntityContext() {
41: }
42:
43: public void ejbLoad() {
44: }
45:
46: public void ejbStore() {
47: }
48:
49: public void ejbActivate() {
50: }
51:
52: public void ejbPassivate() {
53: }
54:
55: public void ejbRemove() throws RemoveException {
56: }
57:
58: }
|