KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > cmp2 > jbas1665 > OrderBean


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.test.cmp2.jbas1665;
23
24
25 import java.util.Collection JavaDoc;
26 import javax.ejb.EntityBean JavaDoc;
27 import javax.ejb.EntityContext JavaDoc;
28 import javax.ejb.RemoveException JavaDoc;
29 import javax.ejb.CreateException JavaDoc;
30 import javax.ejb.FinderException JavaDoc;
31
32
33 /**
34  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
35  * @version <tt>$Revision: 44171 $</tt>
36  */

37 public abstract class OrderBean implements EntityBean JavaDoc
38 {
39    // CMP accessors --------------------------------------------
40
/**
41     * @ejb.pk-field
42     * @ejb.persistent-field
43     * @ejb.interface-method
44     */

45    public abstract Integer JavaDoc getId();
46
47    public abstract void setId(Integer JavaDoc id);
48
49    /**
50     * @ejb.persistent-field
51     * @ejb.interface-method
52     */

53    public abstract String JavaDoc getName();
54
55   /**
56    * @ejb.interface-method
57    */

58    public abstract void setName(String JavaDoc name);
59
60    public abstract Collection JavaDoc ejbSelectSelect(String JavaDoc query, Object JavaDoc[] params) throws FinderException JavaDoc;
61
62    public Collection JavaDoc ejbHomeSelect(String JavaDoc query, Object JavaDoc[] params) throws FinderException JavaDoc
63    {
64       return ejbSelectSelect(query, params);
65    }
66
67    /**
68     * @throws javax.ejb.CreateException
69     * @ejb.create-method
70     */

71    public Integer JavaDoc ejbCreate(Integer JavaDoc id, String JavaDoc name)
72       throws CreateException JavaDoc
73    {
74       setId(id);
75       setName(name);
76       return null;
77    }
78
79    public void ejbPostCreate(Integer JavaDoc id, String JavaDoc name)
80    {
81    }
82
83    /**
84     * @param ctx The new entityContext value
85     */

86    public void setEntityContext(EntityContext JavaDoc ctx)
87    {
88    }
89
90    /**
91     * Unset the associated entity context.
92     */

93    public void unsetEntityContext()
94    {
95    }
96
97    public void ejbActivate()
98    {
99    }
100
101    public void ejbLoad()
102    {
103    }
104
105    public void ejbPassivate()
106    {
107    }
108
109    public void ejbRemove() throws RemoveException JavaDoc
110    {
111    }
112
113    public void ejbStore()
114    {
115    }
116 }
117
Popular Tags