01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * 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, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package org.apache.openejb.test.entity.cmr.onetoone;
18:
19: import org.apache.openejb.test.entity.cmr.CompoundPK;
20:
21: import javax.ejb.EntityBean;
22: import javax.ejb.EntityContext;
23: import javax.ejb.CreateException;
24: import javax.ejb.RemoveException;
25:
26: /**
27: *
28: * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 $
29: */
30: public abstract class PersonBean implements EntityBean {
31: // CMP
32: public abstract Integer getId();
33:
34: public abstract void setId(Integer id);
35:
36: public abstract String getName();
37:
38: public abstract void setName(String name);
39:
40: // CMR
41: public abstract LicenseLocal getLicense();
42:
43: public abstract void setLicense(LicenseLocal license);
44:
45: public Integer ejbCreate(Integer id) throws CreateException {
46: setId(id);
47: return null;
48: }
49:
50: public void ejbPostCreate(Integer id) {
51: }
52:
53: public CompoundPK ejbCreate(PersonPk primaryKey)
54: throws CreateException {
55: setId(primaryKey.id);
56: setName(primaryKey.name);
57: return null;
58: }
59:
60: public void ejbPostCreate(PersonPk primaryKey) {
61: }
62:
63: public void setEntityContext(EntityContext ctx) {
64: }
65:
66: public void unsetEntityContext() {
67: }
68:
69: public void ejbActivate() {
70: }
71:
72: public void ejbPassivate() {
73: }
74:
75: public void ejbLoad() {
76: }
77:
78: public void ejbStore() {
79: }
80:
81: public void ejbRemove() throws RemoveException {
82: }
83: }
|