KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > my > enterprise > beans > NewEntityBeanMPBean


1 package my.enterprise.beans;
2     
3 import javax.ejb.*;
4   
5 /**
6  * This is the bean class for the NewEntityBeanMP enterprise bean.
7  * Created Feb 19, 2005 9:19:46 PM
8  * @author mg116726
9  */

10    public class NewEntityBeanMPBean implements javax.ejb.EntityBean JavaDoc, my.enterprise.beans.NewEntityBeanMPLocalBusiness {
11          private javax.ejb.EntityContext JavaDoc context;
12         
13          // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click the + sign on the left to edit the code.">
14
// TODO Add code to acquire and use other enterprise resources (DataSource, JMS, enterprise beans, Web services)
15
// TODO Add business methods
16
// TODO Add create methods
17
/**
18           * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
19           */

20           public void setEntityContext (javax.ejb.EntityContext JavaDoc aContext) {
21               context = aContext;
22           }
23
24          /**
25           * @see javax.ejb.EntityBean#ejbActivate()
26           */

27           public void ejbActivate () {
28             
29           }
30   
31          /**
32           * @see javax.ejb.EntityBean#ejbPassivate()
33           */

34           public void ejbPassivate () {
35
36           }
37
38          /**
39           * @see javax.ejb.EntityBean#ejbRemove()
40           */

41           public void ejbRemove () {
42
43           }
44   
45          /**
46           * @see javax.ejb.EntityBean#unsetEntityContext()
47           */

48           public void unsetEntityContext () {
49               context = null;
50           }
51
52          /**
53           * @see javax.ejb.EntityBean#ejbLoad()
54           */

55           public void ejbLoad () {
56              // TODO add code to retrieve data
57
}
58   
59          /**
60           * @see javax.ejb.EntityBean#ejbStore()
61           */

62           public void ejbStore () {
63              // TODO add code to persist data
64
}
65   
66         // </editor-fold>
67

68         /**
69          * See EJB 2.0 and EJB 2.1 section 12.2.5
70          */

71         public java.lang.String JavaDoc ejbFindByPrimaryKey (java.lang.String JavaDoc aKey) throws javax.ejb.FinderException JavaDoc {
72             // TODO add code to locate aKey from persistent storage
73
// throw javax.ejb.ObjectNotFoundException if aKey is not in
74
// persistent storage.
75
return "key";
76         }
77    }
78   
Popular Tags