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