File: DiscountCodeTblBean.java

package info (click to toggle)
libnb-platform18-java 12.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 729,800 kB
  • sloc: java: 5,059,097; xml: 574,432; php: 78,788; javascript: 29,039; ansic: 10,278; sh: 6,386; cpp: 4,612; jsp: 3,643; sql: 1,097; makefile: 540; objc: 288; perl: 277; haskell: 93
file content (93 lines) | stat: -rw-r--r-- 2,535 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package testPackage;

import javax.ejb.*;

/**
 * This is the bean class for the DiscountCodeTblBean enterprise bean.
 * Created Kdysi
 * @author Kdosi
 */
public abstract class DiscountCodeTblBean implements javax.ejb.EntityBean, testPackage.DiscountCodeTblLocalBusiness {
    private javax.ejb.EntityContext context;
    
    // <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click on the + sign on the left to edit the code.">
    // TODO Consider creating Transfer Object to encapsulate data
    // TODO Review finder methods
    /**
     * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
     */
    public void setEntityContext(javax.ejb.EntityContext aContext) {
        context = aContext;
    }
    
    /**
     * @see javax.ejb.EntityBean#ejbActivate()
     */
    public void ejbActivate() {
        
    }
    
    /**
     * @see javax.ejb.EntityBean#ejbPassivate()
     */
    public void ejbPassivate() {
        
    }
    
    /**
     * @see javax.ejb.EntityBean#ejbRemove()
     */
    public void ejbRemove() {
        
    }
    
    /**
     * @see javax.ejb.EntityBean#unsetEntityContext()
     */
    public void unsetEntityContext() {
        context = null;
    }
    
    /**
     * @see javax.ejb.EntityBean#ejbLoad()
     */
    public void ejbLoad() {
        
    }
    
    /**
     * @see javax.ejb.EntityBean#ejbStore()
     */
    public void ejbStore() {
        
    }
    // </editor-fold>
    
    
    public abstract java.lang.String getDiscountCode();
    public abstract void setDiscountCode(java.lang.String discountCode);
    
    public abstract java.math.BigDecimal getRate();
    public abstract void setRate(java.math.BigDecimal rate);
    
    public abstract java.util.Collection getCustomerTblBean();
    public abstract void setCustomerTblBean(java.util.Collection customerTblBean);
    
    
    public java.lang.String ejbCreate(java.lang.String discountCode, java.math.BigDecimal rate)  throws javax.ejb.CreateException {
        if (discountCode == null) {
            throw new javax.ejb.CreateException("The field \"discountCode\" must not be null");
        }
        
        // TODO add additional validation code, throw CreateException if data is not valid
        setDiscountCode(discountCode);
        setRate(rate);
        
        return null;
    }
    
    public void ejbPostCreate(java.lang.String discountCode, java.math.BigDecimal rate) {
        // TODO populate relationships here if appropriate
        
    }
}