| 1 package cmp; 2 3 import javax.ejb.*; 4 5 8 public abstract class CustomerBean implements javax.ejb.EntityBean , cmp.CustomerLocalBusiness { 9 private javax.ejb.EntityContext context; 10 11 17 public void setEntityContext(javax.ejb.EntityContext aContext) { 18 context = aContext; 19 } 20 21 24 public void ejbActivate() { 25 26 } 27 28 31 public void ejbPassivate() { 32 33 } 34 35 38 public void ejbRemove() { 39 40 } 41 42 45 public void unsetEntityContext() { 46 context = null; 47 } 48 49 52 public void ejbLoad() { 53 54 } 55 56 59 public void ejbStore() { 60 61 } 62 64 65 public abstract java.lang.Long getId(); 66 public abstract void setId(java.lang.Long id); 67 68 public abstract java.lang.String getLastName(); 69 public abstract void setLastName(java.lang.String lastName); 70 71 public abstract java.lang.String getFirstName(); 72 public abstract void setFirstName(java.lang.String firstName); 73 74 75 public java.lang.String ejbCreate(java.lang.Long id, java.lang.String lastName, java.lang.String firstName) throws javax.ejb.CreateException { 76 if (id == null) { 77 throw new javax.ejb.CreateException ("The field \"id\" must not be null"); 78 } 79 if (lastName == null) { 80 throw new javax.ejb.CreateException ("The field \"lastName\" must not be null"); 81 } 82 83 setId(id); 85 setLastName(lastName); 86 setFirstName(firstName); 87 88 return null; 89 } 90 91 public void ejbPostCreate(java.lang.Long id, java.lang.String lastName, java.lang.String firstName) { 92 94 } 95 96 public abstract int ejbSelectBy() throws javax.ejb.FinderException ; 97 } 98 | Popular Tags |