01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.openejb.test.simple.bmp;
19:
20: import javax.ejb.EJBException;
21: import javax.ejb.EntityBean;
22: import javax.ejb.EntityContext;
23: import javax.ejb.RemoveException;
24:
25: /**
26: *
27: *
28: * @version $Rev: 476321 $ $Date: 2006-11-17 13:18:49 -0800 (Fri, 17 Nov 2006) $
29: */
30: public class SimpleBMPEntityEJB implements EntityBean {
31: private static final Integer PK = new Integer(1);
32: private static String name = "SomeName";
33: private static String value = "SomeValue";
34:
35: public Integer ejbCreate() {
36: return PK;
37: }
38:
39: public void ejbPostCreate() {
40: }
41:
42: public Integer ejbFindByPrimaryKey(Integer key)
43: throws javax.ejb.FinderException {
44: if (PK.equals(key)) {
45: return PK;
46: } else {
47: return null;
48: }
49: }
50:
51: public String getName() {
52: return name;
53: }
54:
55: public void setName(String name) {
56: SimpleBMPEntityEJB.name = name;
57: }
58:
59: public String getValue() {
60: return value;
61: }
62:
63: public void setValue(String value) {
64: SimpleBMPEntityEJB.value = value;
65: }
66:
67: public void ejbActivate() throws EJBException {
68: }
69:
70: public void ejbLoad() throws EJBException {
71: }
72:
73: public void ejbPassivate() throws EJBException {
74: }
75:
76: public void ejbRemove() throws RemoveException, EJBException {
77: }
78:
79: public void ejbStore() throws EJBException {
80: }
81:
82: public void setEntityContext(EntityContext ctx) throws EJBException {
83: }
84:
85: public void unsetEntityContext() throws EJBException {
86: }
87: }
|