KickJava   Java API By Example, From Geeks To Geeks.

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


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/Account.
26  */

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