KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > banknew > ejb > TransactionCMP


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2006, 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.banknew.ejb;
23
24 /**
25  * CMP layer for bank/Transaction.
26  */

27 public abstract class TransactionCMP
28    extends org.jboss.test.banknew.ejb.TransactionBean
29    implements javax.ejb.EntityBean JavaDoc
30 {
31
32    public org.jboss.test.banknew.interfaces.TransactionData getData()
33    {
34       org.jboss.test.banknew.interfaces.TransactionData dataHolder = null;
35       try
36       {
37          dataHolder = new org.jboss.test.banknew.interfaces.TransactionData();
38
39          dataHolder.setId( getId() );
40          dataHolder.setAcountId( getAcountId() );
41          dataHolder.setType( getType() );
42          dataHolder.setAmount( getAmount() );
43          dataHolder.setDate( getDate() );
44          dataHolder.setDescription( getDescription() );
45
46       }
47       catch (RuntimeException JavaDoc e)
48       {
49          throw new javax.ejb.EJBException JavaDoc(e);
50       }
51
52       return dataHolder;
53    }
54
55    public void setData( org.jboss.test.banknew.interfaces.TransactionData dataHolder )
56    {
57       try
58       {
59          setAcountId( dataHolder.getAcountId() );
60          setType( dataHolder.getType() );
61          setAmount( dataHolder.getAmount() );
62          setDate( dataHolder.getDate() );
63          setDescription( dataHolder.getDescription() );
64
65       }
66       catch (Exception JavaDoc e)
67       {
68          throw new javax.ejb.EJBException JavaDoc(e);
69       }
70    }
71
72    public void ejbLoad() throws java.rmi.RemoteException JavaDoc
73    {
74       super.ejbLoad();
75    }
76
77    public void ejbStore() throws java.rmi.RemoteException JavaDoc
78    {
79          super.ejbStore();
80    }
81
82    public void ejbActivate() throws java.rmi.RemoteException JavaDoc
83    {
84       super.ejbActivate();
85    }
86
87    public void ejbPassivate() throws java.rmi.RemoteException JavaDoc
88    {
89       super.ejbPassivate();
90
91    }
92
93    public void setEntityContext(javax.ejb.EntityContext JavaDoc ctx) throws java.rmi.RemoteException JavaDoc
94    {
95       super.setEntityContext(ctx);
96    }
97
98    public void unsetEntityContext() throws java.rmi.RemoteException JavaDoc
99    {
100       super.unsetEntityContext();
101    }
102
103    public void ejbRemove() throws java.rmi.RemoteException JavaDoc, javax.ejb.RemoveException JavaDoc
104    {
105       super.ejbRemove();
106
107    }
108
109    public abstract java.lang.String JavaDoc getId() ;
110
111    public abstract void setId( java.lang.String JavaDoc id ) ;
112
113    public abstract java.lang.String JavaDoc getAcountId() ;
114
115    public abstract void setAcountId( java.lang.String JavaDoc acountId ) ;
116
117    public abstract int getType() ;
118
119    public abstract void setType( int type ) ;
120
121    public abstract float getAmount() ;
122
123    public abstract void setAmount( float amount ) ;
124
125    public abstract java.util.Date JavaDoc getDate() ;
126
127    public abstract void setDate( java.util.Date JavaDoc date ) ;
128
129    public abstract java.lang.String JavaDoc getDescription() ;
130
131    public abstract void setDescription( java.lang.String JavaDoc description ) ;
132
133 }
134
Popular Tags