001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.ejbconf.beans.ejb; // Generated package name
023:
024: import java.rmi.RemoteException;
025:
026: import javax.ejb.CreateException;
027: import javax.ejb.EntityBean;
028: import javax.ejb.EntityContext;
029:
030: /**
031: * ReadOnlyBean.java
032: *
033: *
034: * Created: Tue Jan 22 17:13:36 2002
035: *
036: * @author <a href="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
037: * @version
038: *
039: *
040: * @ejb:bean name="ReadOnly"
041: * jndi-name="ReadOnly"
042: * local-jndi-name="LocalReadOnly"
043: * view-type="both"
044: * type="CMP"
045: * cmp-version="2.x"
046: * primkey-field="id"
047: * @ejb:pk class="java.lang.Integer"
048: * @ejb:finder signature="java.util.Collection findAll()"
049: * @jboss:read-only read-only="true"
050: */
051:
052: public abstract class ReadOnlyBean implements EntityBean {
053: public ReadOnlyBean() {
054:
055: }
056:
057: /**
058: * Describe <code>ejbCreate</code> method here.
059: *
060: * @param id an <code>Integer</code> value
061: * @param value an <code>Integer</code> value
062: * @return an <code>Integer</code> value
063: * @ejb:create-method
064: */
065: public Integer ejbCreate(Integer id, Integer value)
066: throws CreateException {
067: setId(id);
068: setValue(value);
069: return null;
070: }
071:
072: public void ejbPostCreate(Integer id, Integer value) {
073: }
074:
075: /**
076: * Get the value of id.
077: * @return value of id.
078: * @ejb:persistent-field
079: * @ejb:interface-method
080: */
081: public abstract Integer getId();
082:
083: /**
084: * Set the value of id.
085: * @param v Value to assign to id.
086: */
087: public abstract void setId(Integer id);
088:
089: /**
090: * Get the value of value.
091: * @return value of value.
092: * @ejb:persistent-field
093: * @ejb:interface-method
094: */
095: public abstract Integer getValue();
096:
097: /**
098: * Set the value of value.
099: * @param v Value to assign to value.
100: * @ejb:interface-method
101: */
102: public abstract void setValue(Integer value);
103:
104: public void ejbActivate() throws RemoteException {
105: }
106:
107: public void ejbPassivate() throws RemoteException {
108: }
109:
110: public void ejbLoad() throws RemoteException {
111: }
112:
113: public void ejbStore() throws RemoteException {
114: }
115:
116: public void ejbRemove() throws RemoteException {
117: }
118:
119: public void setEntityContext(EntityContext ctx)
120: throws RemoteException {
121: }
122:
123: public void unsetEntityContext() throws RemoteException {
124: }
125:
126: }// ReadOnlyBean
|