KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > titan > customer > CreditCardBean


1 package com.titan.customer;
2
3 import javax.ejb.EntityContext;
4 import java.util.Date;
5 import javax.naming.InitialContext;
6 import javax.naming.NamingException;
7
8 public abstract class CreditCardBean implements javax.ejb.EntityBean {
9
10     public Object ejbCreate(Date exp, String numb, String name, String org)
11         throws javax.ejb.CreateException {
12
13         setExpirationDate(exp);
14         setNumber(numb);
15         setNameOnCard(name);
16         setCreditOrganization(org);
17         return null;
18     }
19
20     public void ejbPostCreate(Date exp, String numb, String name, String org) {
21     }
22
23     // relationship fields
24

25     public abstract CustomerLocal getCustomer( );
26     public abstract void setCustomer(CustomerLocal cust);
27
28     // persistent fields
29
public abstract Date getExpirationDate();
30     public abstract void setExpirationDate(Date date);
31     public abstract String getNumber();
32     public abstract void setNumber(String number);
33     public abstract String getNameOnCard();
34     public abstract void setNameOnCard(String name);
35     public abstract String getCreditOrganization();
36     public abstract void setCreditOrganization(String org);
37
38     // standard call back methods
39

40     public void setEntityContext(EntityContext ec){}
41     public void unsetEntityContext(){}
42     public void ejbLoad(){}
43     public void ejbStore(){}
44     public void ejbActivate(){}
45     public void ejbPassivate(){}
46     public void ejbRemove() throws javax.ejb.RemoveException{}
47
48 }
49
Popular Tags