~ubuntu-branches/ubuntu/quantal/netbeans/quantal

« back to all changes in this revision

Viewing changes to j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/resources/templates/EJB21BmpEjbClass.template

  • Committer: Bazaar Package Importer
  • Author(s): Marek Slama
  • Date: 2008-01-29 14:11:22 UTC
  • Revision ID: james.westby@ubuntu.com-20080129141122-fnzjbo11ntghxfu7
Tags: upstream-6.0.1
ImportĀ upstreamĀ versionĀ 6.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<#assign licenseFirst = "/*">
 
2
<#assign licensePrefix = " * ">
 
3
<#assign licenseLast = " */">
 
4
<#include "../../Licenses/license-${project.license}.txt">
 
5
 
 
6
package ${package};
 
7
 
 
8
import javax.ejb.EntityBean;
 
9
import javax.ejb.EntityContext;
 
10
import javax.ejb.FinderException;
 
11
 
 
12
/**
 
13
 *
 
14
 * @author ${user}
 
15
 */
 
16
public class ${name} implements EntityBean {
 
17
 
 
18
    private EntityContext context;
 
19
    
 
20
    // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click the + sign on the left to edit the code.">
 
21
 
 
22
    // TODO Add code to acquire and use other enterprise resources (DataSource, JMS, enterprise beans, Web services)
 
23
    // TODO Add business methods
 
24
    // TODO Add create methods
 
25
 
 
26
    /**
 
27
     * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
 
28
     */
 
29
    public void setEntityContext(EntityContext aContext) {
 
30
        context = aContext;
 
31
    }
 
32
    
 
33
    /**
 
34
     * @see javax.ejb.EntityBean#ejbActivate()
 
35
     */
 
36
    public void ejbActivate() {
 
37
        
 
38
    }
 
39
    
 
40
    /**
 
41
     * @see javax.ejb.EntityBean#ejbPassivate()
 
42
     */
 
43
    public void ejbPassivate() {
 
44
        
 
45
    }
 
46
    
 
47
    /**
 
48
     * @see javax.ejb.EntityBean#ejbRemove()
 
49
     */
 
50
    public void ejbRemove() {
 
51
        
 
52
    }
 
53
    
 
54
    /**
 
55
     * @see javax.ejb.EntityBean#unsetEntityContext()
 
56
     */
 
57
    public void unsetEntityContext() {
 
58
        context = null;
 
59
    }
 
60
    
 
61
    /**
 
62
     * @see javax.ejb.EntityBean#ejbLoad()
 
63
     */
 
64
    public void ejbLoad() {
 
65
        // TODO add code to retrieve data
 
66
    }
 
67
    
 
68
    /**
 
69
     * @see javax.ejb.EntityBean#ejbStore()
 
70
     */
 
71
    public void ejbStore() {
 
72
        // TODO add code to persist data
 
73
    }
 
74
 
 
75
    // </editor-fold>
 
76
    
 
77
    /**
 
78
     * See EJB 2.0 and EJB 2.1 section 12.2.5
 
79
     */
 
80
    public ${primaryKey} ejbFindByPrimaryKey(${primaryKey} aKey) throws FinderException {
 
81
        // TODO add code to locate aKey from persistent storage
 
82
        // throw javax.ejb.ObjectNotFoundException if aKey is not in
 
83
        // persistent storage.
 
84
    }
 
85
 
 
86
}