1 22 package org.jboss.test.bankiiop.ejb; 23 24 import java.util.*; 25 26 import org.jboss.test.util.ejb.EntitySupport; 27 import org.jboss.test.bankiiop.interfaces.*; 28 29 35 public class CustomerBean 36 extends EntitySupport 37 { 38 40 public String id; 42 public String name; 43 public Collection accounts; 44 45 47 49 public String getId() 51 { 52 return id; 53 } 54 55 public void setId(String id) 56 { 57 this.id = id; 58 } 59 60 public String getName() 61 { 62 return name; 63 } 64 65 public void setName(String name) 66 { 67 this.name = name; 68 } 69 70 public Collection getAccounts() 71 { 72 return accounts; 73 } 74 75 public void addAccount(Account acct) 76 { 77 accounts.add(acct); 78 } 79 80 public void removeAccount(Account acct) 81 { 82 accounts.remove(acct); 83 } 84 85 public CustomerPK ejbCreate(String id, String name) 87 { 88 setId(id); 89 setName(name); 90 accounts = new ArrayList(); 91 92 CustomerPK pk = new CustomerPK(); 93 pk.id = id; 94 pk.name = name; 95 96 return pk; 97 } 98 99 public void ejbPostCreate(String id, String name) 100 { 101 } 102 } 103 104 136 | Popular Tags |