📄 customerbean.java
字号:
package com.j2eeapp.ch21.cmp;
import javax.ejb.EntityContext;
import javax.ejb.CreateException;
import javax.ejb.EJBException;
import javax.naming.NamingException;
import javax.naming.InitialContext;
import java.util.Date;
import java.util.Collection;
import java.util.Iterator;
import java.util.ArrayList;
import javax.ejb.FinderException;
public abstract class CustomerBean implements javax.ejb.EntityBean {
public Integer ejbCreate(Integer id) throws CreateException
{
this.setId(id);
return null;
}
public void ejbPostCreate(Integer id){
}
//abstract cmp methods
public abstract Address getAddress();
public abstract void setAddress(Address address);
public abstract Integer getId();
public abstract void setId(Integer id);
public abstract Name getName();
public abstract void setName(Name name);
// ejbSelect methods
public abstract Collection ejbSelectCities()
throws FinderException;
// query methods, these wrap ejbSelect methods in home interface
public Collection ejbHomeQueryCities()throws FinderException
{
return ejbSelectCities();
}
// standard call back methods
public void setEntityContext(EntityContext ec){}
public void unsetEntityContext(){}
public void ejbLoad(){}
public void ejbStore(){}
public void ejbActivate(){}
public void ejbPassivate(){}
public void ejbRemove(){}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -