1 package test; 2 3 import java.sql.Date ; 4 import java.sql.Time ; 5 import javax.ejb.*; 6 7 12 public abstract class CustomerTblBean implements EntityBean, CustomerTblLocalBusiness { 13 private EntityContext context; 14 15 21 public void setEntityContext(EntityContext aContext) { 22 context = aContext; 23 } 24 25 28 public void ejbActivate() { 29 30 } 31 32 35 public void ejbPassivate() { 36 37 } 38 39 42 public void ejbRemove() { 43 44 } 45 46 49 public void unsetEntityContext() { 50 context = null; 51 } 52 53 56 public void ejbLoad() { 57 58 } 59 60 63 public void ejbStore() { 64 65 } 66 68 69 public abstract Integer getCustomerNum(); 70 public abstract void setCustomerNum(Integer customerNum); 71 72 public abstract String getName(); 73 public abstract void setName(String name); 74 75 public abstract String getAddrLn1(); 76 public abstract void setAddrLn1(String addrLn1); 77 78 public abstract String getAddrLn2(); 79 public abstract void setAddrLn2(String addrLn2); 80 81 public abstract String getCity(); 82 public abstract void setCity(String city); 83 84 public abstract String getState(); 85 public abstract void setState(String state); 86 87 public abstract String getPhone(); 88 public abstract void setPhone(String phone); 89 90 public abstract String getFax(); 91 public abstract void setFax(String fax); 92 93 public abstract String getEmail(); 94 public abstract void setEmail(String email); 95 96 public abstract Integer getCreditLimit(); 97 public abstract void setCreditLimit(Integer creditLimit); 98 99 public abstract Date getLastSaleDate(); 100 public abstract void setLastSaleDate(Date lastSaleDate); 101 102 public abstract Time getLastSaleTime(); 103 public abstract void setLastSaleTime(Time lastSaleTime); 104 105 public abstract DiscountCodeTblLocal getDiscountCode(); 106 public abstract void setDiscountCode(DiscountCodeTblLocal discountCode); 107 108 public abstract test.MicroMarketsTblLocal getZip(); 109 public abstract void setZip(test.MicroMarketsTblLocal zip); 110 111 112 public Integer ejbCreate(Integer customerNum, String name, String addrLn1, String addrLn2, String city, String state, String phone, String fax, String email, Integer creditLimit, Date lastSaleDate, Time lastSaleTime, DiscountCodeTblLocal discountCode, test.MicroMarketsTblLocal zip) throws CreateException { 113 if (customerNum == null) { 114 throw new CreateException("The field \"customerNum\" must not be null"); 115 } 116 if (discountCode == null) { 117 throw new CreateException("The field \"discountCode\" must not be null"); 118 } 119 if (zip == null) { 120 throw new CreateException("The field \"zip\" must not be null"); 121 } 122 123 setCustomerNum(customerNum); 125 setName(name); 126 setAddrLn1(addrLn1); 127 setAddrLn2(addrLn2); 128 setCity(city); 129 setState(state); 130 setPhone(phone); 131 setFax(fax); 132 setEmail(email); 133 setCreditLimit(creditLimit); 134 setLastSaleDate(lastSaleDate); 135 setLastSaleTime(lastSaleTime); 136 137 return null; 138 } 139 140 public void ejbPostCreate(Integer customerNum, String name, String addrLn1, String addrLn2, String city, String state, String phone, String fax, String email, Integer creditLimit, Date lastSaleDate, Time lastSaleTime, DiscountCodeTblLocal discountCode, test.MicroMarketsTblLocal zip) { 141 setDiscountCode(discountCode); 143 setZip(zip); 144 145 } 146 } 147 | Popular Tags |