1 37 38 package com.sun.j2ee.blueprints.customer.profile.ejb; 39 40 import javax.ejb.EntityContext; 41 import javax.ejb.RemoveException; 42 import javax.ejb.CreateException; 43 import javax.naming.NamingException; 44 import javax.naming.InitialContext; 45 46 public abstract class ProfileEJB implements javax.ejb.EntityBean { 47 48 private EntityContext context = null; 49 50 public abstract String getPreferredLanguage(); 53 public abstract void setPreferredLanguage(String preferredLanguage); 54 55 public abstract String getFavoriteCategory(); 56 public abstract void setFavoriteCategory(String category); 57 58 public abstract boolean getMyListPreference(); 59 public abstract void setMyListPreference(boolean myListPreference); 60 61 public abstract boolean getBannerPreference(); 62 public abstract void setBannerPreference(boolean bannerPreference); 63 64 public Object ejbCreate(String preferredLanguage, String favoriteCategory, 67 boolean myListPreference, boolean bannerPreference) throws CreateException { 68 setPreferredLanguage(preferredLanguage); 69 setFavoriteCategory(favoriteCategory); 70 setMyListPreference(myListPreference); 71 setBannerPreference(bannerPreference); 72 return null; 73 } 74 75 public void ejbPostCreate(String preferredLanguage, String favoriteCategory, 78 boolean myListPreference, boolean bannerPreference) throws CreateException { 79 } 80 81 public void setEntityContext(EntityContext c) { 82 context = c; 83 } 84 public void unsetEntityContext() { 85 context = null; 86 } 87 public void ejbRemove() throws RemoveException { } 88 public void ejbActivate() { } 89 public void ejbPassivate() { } 90 public void ejbStore() { } 91 public void ejbLoad() { } 92 } 93 | Popular Tags |