1 22 package org.jboss.test.cmp2.commerce; 23 24 import java.util.Collection ; 25 import javax.ejb.CreateException ; 26 import javax.ejb.EntityBean ; 27 import javax.ejb.EntityContext ; 28 import javax.ejb.FinderException ; 29 30 public abstract class UserBean implements EntityBean { 31 transient private EntityContext ctx; 32 33 public String ejbCreate(String userId) throws CreateException { 34 setUserId(userId); 35 return null; 36 } 37 38 public void ejbPostCreate(String id) { 39 } 40 41 public abstract String getUserId(); 42 public abstract void setUserId(String userId); 43 44 public abstract String getUserName(); 45 public abstract void setUserName(String name); 46 47 public abstract String getEmail(); 48 public abstract void setEmail(String email); 49 50 public abstract boolean getSendSpam(); 51 public abstract void setSendSpam(boolean sendSpam); 52 53 public abstract Collection ejbSelectUserIds() throws FinderException ; 54 public Collection getUserIds() throws FinderException { 55 return ejbSelectUserIds(); 56 } 57 58 public void setEntityContext(EntityContext ctx) { this.ctx = ctx; } 59 public void unsetEntityContext() { this.ctx = null; } 60 public void ejbActivate() { } 61 public void ejbPassivate() { } 62 public void ejbLoad() { } 63 public void ejbStore() { } 64 public void ejbRemove() { } 65 } 66 67 68 | Popular Tags |