UserEJB.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:1k
源码类别:
Java编程
开发平台:
Java
- package day21ex.user;
- import javax.ejb.*;
- public abstract class UserEJB implements EntityBean {
- private EntityContext context = null;
- public abstract String getLoginName();
- public abstract void setLoginName(String loginName);
- public abstract String getPassword();
- public abstract void setPassword(String password);
- public String ejbCreate(String loginName, String password)
- throws CreateException {
- setLoginName(loginName);
- setPassword(password);
- return null;
- }
- public void ejbPostCreate(String loginName, String password)
- throws CreateException {
- }
- public boolean matchPassword(String password) {
- return password.equals(getPassword());
- }
- public void setEntityContext(EntityContext c) {
- context = c;
- }
- public void unsetEntityContext() {}
- public void ejbRemove() throws RemoveException {}
- public void ejbActivate() {}
- public void ejbPassivate() {}
- public void ejbStore() {}
- public void ejbLoad() {}
- }