KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > ejbconf > beans > ejb > ReadOnlyBean


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.ejbconf.beans.ejb; // Generated package name
23

24 import java.rmi.RemoteException JavaDoc;
25
26 import javax.ejb.CreateException JavaDoc;
27 import javax.ejb.EntityBean JavaDoc;
28 import javax.ejb.EntityContext JavaDoc;
29
30 /**
31  * ReadOnlyBean.java
32  *
33  *
34  * Created: Tue Jan 22 17:13:36 2002
35  *
36  * @author <a HREF="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
37  * @version
38  *
39  *
40  * @ejb:bean name="ReadOnly"
41  * jndi-name="ReadOnly"
42  * local-jndi-name="LocalReadOnly"
43  * view-type="both"
44  * type="CMP"
45  * cmp-version="2.x"
46  * primkey-field="id"
47  * @ejb:pk class="java.lang.Integer"
48  * @ejb:finder signature="java.util.Collection findAll()"
49  * @jboss:read-only read-only="true"
50  */

51
52 public abstract class ReadOnlyBean implements EntityBean JavaDoc
53 {
54    public ReadOnlyBean ()
55    {
56       
57    }
58
59    /**
60     * Describe <code>ejbCreate</code> method here.
61     *
62     * @param id an <code>Integer</code> value
63     * @param value an <code>Integer</code> value
64     * @return an <code>Integer</code> value
65     * @ejb:create-method
66     */

67    public Integer JavaDoc ejbCreate(Integer JavaDoc id, Integer JavaDoc value) throws CreateException JavaDoc
68    {
69       setId(id);
70       setValue(value);
71       return null;
72    }
73
74    public void ejbPostCreate(Integer JavaDoc id, Integer JavaDoc value)
75    {
76    }
77
78    
79    /**
80     * Get the value of id.
81     * @return value of id.
82     * @ejb:persistent-field
83     * @ejb:interface-method
84     */

85    public abstract Integer JavaDoc getId();
86
87    
88    /**
89     * Set the value of id.
90     * @param v Value to assign to id.
91     */

92    public abstract void setId(Integer JavaDoc id);
93    
94    
95    /**
96     * Get the value of value.
97     * @return value of value.
98     * @ejb:persistent-field
99     * @ejb:interface-method
100     */

101    public abstract Integer JavaDoc getValue();
102    
103    /**
104     * Set the value of value.
105     * @param v Value to assign to value.
106     * @ejb:interface-method
107     */

108    public abstract void setValue(Integer JavaDoc value);
109
110    
111    public void ejbActivate() throws RemoteException JavaDoc
112    {
113    }
114    
115    public void ejbPassivate() throws RemoteException JavaDoc
116    {
117    }
118    
119    public void ejbLoad() throws RemoteException JavaDoc
120    {
121    }
122    
123    public void ejbStore() throws RemoteException JavaDoc
124    {
125    }
126    
127    public void ejbRemove() throws RemoteException JavaDoc
128    {
129    }
130    
131    public void setEntityContext(EntityContext JavaDoc ctx) throws RemoteException JavaDoc
132    {
133    }
134    
135    public void unsetEntityContext() throws RemoteException JavaDoc
136    {
137    }
138    
139 }// ReadOnlyBean
140
Popular Tags