import javax.ejb.*;abstract public class MemberBean implements EntityBean {
EntityContext entityContext;
public java.lang.String ejbCreate(java.lang.String id) throws CreateException {
setId(id);
return null;
} public void ejbPostCreate(java.lang.String id) throws CreateException {
/**@todo Complete this method*/
}
public void ejbRemove() throws RemoveException {
/**@todo Complete this method*/
}
public abstract void setId(java.lang.String id);
public abstract void setPassword(java.lang.String password); public abstract java.lang.String getId();
public abstract java.lang.String getPassword(); public void ejbLoad() {
/**@todo Complete this method*/
}
public void ejbStore() {
/**@todo Complete this method*/
}
public void ejbActivate() {
/**@todo Complete this method*/
}
public void ejbPassivate() {
/**@todo Complete this method*/
}
public void unsetEntityContext() {
this.entityContext = null;
}
public void setEntityContext(EntityContext entityContext) {
this.entityContext = entityContext;
}
}
EntityContext entityContext;
public java.lang.String ejbCreate(java.lang.String id) throws CreateException {
setId(id);
return null;
} public void ejbPostCreate(java.lang.String id) throws CreateException {
/**@todo Complete this method*/
}
public void ejbRemove() throws RemoveException {
/**@todo Complete this method*/
}
public abstract void setId(java.lang.String id);
public abstract void setPassword(java.lang.String password); public abstract java.lang.String getId();
public abstract java.lang.String getPassword(); public void ejbLoad() {
/**@todo Complete this method*/
}
public void ejbStore() {
/**@todo Complete this method*/
}
public void ejbActivate() {
/**@todo Complete this method*/
}
public void ejbPassivate() {
/**@todo Complete this method*/
}
public void unsetEntityContext() {
this.entityContext = null;
}
public void setEntityContext(EntityContext entityContext) {
this.entityContext = entityContext;
}
}
import java.util.*;public interface EmployeeHome extends javax.ejb.EJBLocalHome {
public Employee create(String id) throws CreateException;
public Collection findByName(String name) throws FinderException;
public Collection findByAge(int age) throws FinderException;
public Collection findAll() throws FinderException;
public Employee findByPrimaryKey(String id) throws FinderException;
}
-----------------------------------------------------------------
//Employee.java Remote interface
package employee;import javax.ejb.*;
import java.util.*;
import java.math.*;public interface Employee extends javax.ejb.EJBLocalObject {
public String getId();
public void setName(String name);
public String getName();
public void setAge(BigDecimal age);
public BigDecimal getAge();
public void setMemo(String memo);
public String getMemo();
}
------------------------------------------------------------
//EmployeeBean.java --- implement class
package employee;import javax.ejb.*;abstract public class EmployeeBean implements EntityBean {
EntityContext entityContext;
public java.lang.String ejbCreate(java.lang.String id) throws CreateException {
setId(id);
return null;
}
public void ejbPostCreate(java.lang.String id) throws CreateException {
/**@todo Complete this method*/
}
public void ejbRemove() throws RemoveException {
/**@todo Complete this method*/
}
public abstract void setId(java.lang.String id);
public abstract void setName(java.lang.String name);
public abstract void setAge(java.math.BigDecimal age);
public abstract void setMemo(java.lang.String memo);
public abstract java.lang.String getId();
public abstract java.lang.String getName();
public abstract java.math.BigDecimal getAge();
public abstract java.lang.String getMemo();
public void ejbLoad() {
/**@todo Complete this method*/
}
public void ejbStore() {
/**@todo Complete this method*/
}
public void ejbActivate() {
/**@todo Complete this method*/
}
public void ejbPassivate() {
/**@todo Complete this method*/
}
public void unsetEntityContext() {
this.entityContext = null;
}
public void setEntityContext(EntityContext entityContext) {
this.entityContext = entityContext;
}
}
import java.util.*;
import java.math.*;public interface Account extends javax.ejb.EJBLocalObject {
public Integer getId();
public void setUsername(String username);
public String getUsername();
public void setPassword(String password);
public String getPassword();
public AccountModel getAccountModel();
public void setAccountModel(AccountModel model);
}
------------------------------------------
package ice;import javax.ejb.*;abstract public class AccountBean implements EntityBean {
EntityContext entityContext; public void ejbRemove() throws RemoveException {
/**@todo Complete this method*/
}
public abstract void setId(Integer id);
public abstract void setUsername(java.lang.String username);
public abstract void setPassword(java.lang.String password);
public abstract Integer getId();
public abstract java.lang.String getUsername();
public abstract java.lang.String getPassword();
public void ejbLoad() {
/**@todo Complete this method*/
}
public void ejbStore() {
/**@todo Complete this method*/
}
public void ejbActivate() {
/**@todo Complete this method*/
}
public void ejbPassivate() {
/**@todo Complete this method*/
}
public void unsetEntityContext() {
this.entityContext = null;
}
public void setEntityContext(EntityContext entityContext) {
this.entityContext = entityContext;
}
public Integer ejbCreate(AccountModel model) throws CreateException {
/**@todo Complete this method*/
this.setId(model.getId());
this.setUsername(model.getUsername());
this.setPassword(model.getPassword());
return null;
}
public void ejbPostCreate(AccountModel model) throws CreateException {
/**@todo Complete this method*/
}
public AccountModel getAccountModel() {
/**@todo Complete this method*/
AccountModel model=new AccountModel();
model.setId(this.getId());
model.setUsername(this.getUsername());
model.setPassword(this.getPassword());
return model;
}
public void setAccountModel(AccountModel model) { this.setUsername(model.getUsername());
this.setPassword(model.getPassword());
/**@todo Complete this method*/
}
}
-----------------------------------------------
package ice;import javax.ejb.*;
import java.util.*;
import java.math.*;public interface AccountHome extends javax.ejb.EJBLocalHome {
public Account create(AccountModel model) throws CreateException;
public Collection findAll() throws FinderException;
public Account findByPrimaryKey(Integer id) throws FinderException;
}