1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.openejb.test.simple.bmp;
21
22 import javax.ejb.EJBException;
23 import javax.ejb.EntityBean;
24 import javax.ejb.EntityContext;
25 import javax.ejb.RemoveException;
26
27 /**
28 *
29 *
30 * @version $Rev: 439078 $ $Date: 2006-08-31 15:46:14 -0700 (Thu, 31 Aug 2006) $
31 */
32 public class SimpleBMPEntityEJB implements EntityBean {
33 private static final Integer PK = new Integer(1);
34 private static String name = "SomeName";
35 private static String value = "SomeValue";
36
37 public Integer ejbCreate() {
38 return PK;
39 }
40
41 public void ejbPostCreate() {
42 }
43
44 public Integer ejbFindByPrimaryKey(Integer key) throws javax.ejb.FinderException {
45 if(PK.equals(key)) {
46 return PK;
47 } else {
48 return null;
49 }
50 }
51
52 public String getName() {
53 return name;
54 }
55
56 public void setName(String name) {
57 SimpleBMPEntityEJB.name = name;
58 }
59
60 public String getValue() {
61 return value;
62 }
63
64 public void setValue(String value) {
65 SimpleBMPEntityEJB.value = value;
66 }
67
68 public void ejbActivate() throws EJBException {
69 }
70
71 public void ejbLoad() throws EJBException {
72 }
73
74 public void ejbPassivate() throws EJBException {
75 }
76
77 public void ejbRemove() throws RemoveException, EJBException {
78 }
79
80 public void ejbStore() throws EJBException {
81 }
82
83 public void setEntityContext(EntityContext ctx) throws EJBException {
84 }
85
86 public void unsetEntityContext() throws EJBException {
87 }
88 }