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.banknew.ejb;
023:
024: /**
025: * CMP layer for bank/Bank.
026: */
027: public abstract class BankCMP extends
028: org.jboss.test.banknew.ejb.BankBean implements
029: javax.ejb.EntityBean {
030:
031: public org.jboss.test.banknew.interfaces.BankData getData() {
032: org.jboss.test.banknew.interfaces.BankData dataHolder = null;
033: try {
034: dataHolder = new org.jboss.test.banknew.interfaces.BankData();
035:
036: dataHolder.setId(getId());
037: dataHolder.setName(getName());
038: dataHolder.setAddress(getAddress());
039:
040: } catch (RuntimeException e) {
041: throw new javax.ejb.EJBException(e);
042: }
043:
044: return dataHolder;
045: }
046:
047: public void setData(
048: org.jboss.test.banknew.interfaces.BankData dataHolder) {
049: try {
050: setName(dataHolder.getName());
051: setAddress(dataHolder.getAddress());
052:
053: } catch (Exception e) {
054: throw new javax.ejb.EJBException(e);
055: }
056: }
057:
058: public void ejbLoad() throws java.rmi.RemoteException {
059: super .ejbLoad();
060: }
061:
062: public void ejbStore() throws java.rmi.RemoteException {
063: super .ejbStore();
064: }
065:
066: public void ejbActivate() throws java.rmi.RemoteException {
067: super .ejbActivate();
068: }
069:
070: public void ejbPassivate() throws java.rmi.RemoteException {
071: super .ejbPassivate();
072:
073: }
074:
075: public void setEntityContext(javax.ejb.EntityContext ctx)
076: throws java.rmi.RemoteException {
077: super .setEntityContext(ctx);
078: }
079:
080: public void unsetEntityContext() throws java.rmi.RemoteException {
081: super .unsetEntityContext();
082: }
083:
084: public void ejbRemove() throws java.rmi.RemoteException,
085: javax.ejb.RemoveException {
086: super .ejbRemove();
087:
088: }
089:
090: public abstract java.lang.String getId();
091:
092: public abstract void setId(java.lang.String id);
093:
094: public abstract java.lang.String getName();
095:
096: public abstract void setName(java.lang.String name);
097:
098: public abstract java.lang.String getAddress();
099:
100: public abstract void setAddress(java.lang.String address);
101:
102: }
|