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/Transaction.
026: */
027: public abstract class TransactionCMP extends
028: org.jboss.test.banknew.ejb.TransactionBean implements
029: javax.ejb.EntityBean {
030:
031: public org.jboss.test.banknew.interfaces.TransactionData getData() {
032: org.jboss.test.banknew.interfaces.TransactionData dataHolder = null;
033: try {
034: dataHolder = new org.jboss.test.banknew.interfaces.TransactionData();
035:
036: dataHolder.setId(getId());
037: dataHolder.setAcountId(getAcountId());
038: dataHolder.setType(getType());
039: dataHolder.setAmount(getAmount());
040: dataHolder.setDate(getDate());
041: dataHolder.setDescription(getDescription());
042:
043: } catch (RuntimeException e) {
044: throw new javax.ejb.EJBException(e);
045: }
046:
047: return dataHolder;
048: }
049:
050: public void setData(
051: org.jboss.test.banknew.interfaces.TransactionData dataHolder) {
052: try {
053: setAcountId(dataHolder.getAcountId());
054: setType(dataHolder.getType());
055: setAmount(dataHolder.getAmount());
056: setDate(dataHolder.getDate());
057: setDescription(dataHolder.getDescription());
058:
059: } catch (Exception e) {
060: throw new javax.ejb.EJBException(e);
061: }
062: }
063:
064: public void ejbLoad() throws java.rmi.RemoteException {
065: super .ejbLoad();
066: }
067:
068: public void ejbStore() throws java.rmi.RemoteException {
069: super .ejbStore();
070: }
071:
072: public void ejbActivate() throws java.rmi.RemoteException {
073: super .ejbActivate();
074: }
075:
076: public void ejbPassivate() throws java.rmi.RemoteException {
077: super .ejbPassivate();
078:
079: }
080:
081: public void setEntityContext(javax.ejb.EntityContext ctx)
082: throws java.rmi.RemoteException {
083: super .setEntityContext(ctx);
084: }
085:
086: public void unsetEntityContext() throws java.rmi.RemoteException {
087: super .unsetEntityContext();
088: }
089:
090: public void ejbRemove() throws java.rmi.RemoteException,
091: javax.ejb.RemoveException {
092: super .ejbRemove();
093:
094: }
095:
096: public abstract java.lang.String getId();
097:
098: public abstract void setId(java.lang.String id);
099:
100: public abstract java.lang.String getAcountId();
101:
102: public abstract void setAcountId(java.lang.String acountId);
103:
104: public abstract int getType();
105:
106: public abstract void setType(int type);
107:
108: public abstract float getAmount();
109:
110: public abstract void setAmount(float amount);
111:
112: public abstract java.util.Date getDate();
113:
114: public abstract void setDate(java.util.Date date);
115:
116: public abstract java.lang.String getDescription();
117:
118: public abstract void setDescription(java.lang.String description);
119:
120: }
|